I love jqGrid but sometimes things seem more complicated than they should be.
What I would like to achieve is to have a checkbox on each row so that a user can choo
Great answer from Oleg, I would also add code to deselect disabled rows, complete onSelectAll function below.
onSelectAll: function(aRowids,status) {
if (status) {
// uncheck "protected" rows
var cbs = $("tr.jqgrow > td > input.cbox:disabled", grid[0]);
cbs.removeAttr("checked");
//modify the selarrrow parameter
grid[0].p.selarrrow = grid.find("tr.jqgrow:has(td > input.cbox:checked)")
.map(function() { return this.id; }) // convert to set of ids
.get(); // convert to instance of Array
//deselect disabled rows
grid.find("tr.jqgrow:has(td > input.cbox:disabled)")
.attr('aria-selected', 'false')
.removeClass('ui-state-highlight');
}
}