jqGrid带checkbox的,如何实现选中行的时候不勾选当前行的复选框?

2025-01-06 11:00:13
推荐回答(1个)
回答1:

jqgrid初始化加上这个方法
beforeSelectRow: function (rowid, e) {
var $myGrid = $(this),
i = $.jgrid.getCellIndex($(e.target).closest('td')[0]),
cm = $myGrid.jqGrid('getGridParam', 'colModel');
return (cm[i].name === 'cb');
},