我想禁用jqgrid 的某些行的checkbox,现在急需要,看到你实现了,希望你能够帮助我,定会万分感谢

2024-11-06 21:13:00
推荐回答(2个)
回答1:

jqgrid 加载完成时,禁用了该checkbox(保证点击全选的时候不被选中),同时隐藏它。

回答2:

$("#id").removeAttr("checked");

添加选中之前的事件可以获取到id 在根据查找找到对应的checkbox 然后就可以继续操作了。

 beforeSelectRow: function(rowid, e) {
        var cbsdis = $("tr#"+rowid+".jqgrow > td > input.cbox:disabled", grid[0]);
        if (cbsdis.length === 0) {
            return true;    // allow select the row
        } else {
            return false;   // not allow select the row
        }
    },

jqgrid: multiselect and disabl