If you see jqGrid demo :
http://www.trirand.com/blog/jqgrid/jqgrid.html
Section : Advanced --> Multiselect
You\'ll see that the checked checkbox is not p
I found this :
onSelectRow: function (id) {
var p = this.p, item = p.data[p._index[id]];
if (typeof (item.cb) === 'undefined') {
item.cb = true;
} else {
item.cb = !item.cb;
}
},
loadComplete: function () {
var p = this.p, data = p.data, item, index = p._index, rowid;
for (rowid in index) {
if (index.hasOwnProperty(rowid)) {
item = data[index[rowid]];
if (typeof (item.cb) === 'boolean' && item.cb) {
$(this).jqGrid('setSelection', rowid, false);
}
}
}
},
It works pretty fine, I must say.