jqgrid 点击行单选中,点击前面复选框可以多选

设置以下两个属性:

multiselect: true,

multiboxonly: true,


如果想要点击行不选中,勾选复选框才选中,只要重写beforeSelectRow方法:

例子:

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');

                }

你可能感兴趣的:(jqgrid 点击行单选中,点击前面复选框可以多选)