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
This is fairly simple to do using the gridComplete and onPaging events plus the jquery .data() method. This is much simpler than a lot of the stuff I've seen floating around the net, so I thought I'd share it. The selector for my grid is '#employeerolegrid'.
gridComplete: function () {
var currentPage = $(this).getGridParam('page').toString();
//retrieve any previously stored rows for this page and re-select them
var retrieveSelectedRows = $(this).data(currentPage);
if (retrieveSelectedRows) {
$.each(retrieveSelectedRows, function (index, value) {
$('#employeerolegrid').setSelection(value, false);
});
}
},
onPaging: function () {
var saveSelectedRows = $(this).getGridParam('selarrrow');
var page = $(this).getGridParam('page') - 1;
//Store any selected rows
$(this).data(page.toString(), saveSelectedRows);
}