To the right, jqGrid will only select rows on the current page. To select other lines, you need to save the list of the selected identifier and manually select them.
To do this, you need to add code to your loadComplete event to find the current page and select any of these lines:
var ids = grid.jqGrid('getDataIDs'); for (var i = 0; i < ids.length; i++){ if (selected[ids[i]] === true ){ grid.setSelection(ids[i], false); } }
You also need to add code to the onSelectRow and onSelectAll in order to configure the selected content when the user selects / deselects rows:
onSelectRow: function(rowid, status){ selected[rowid] = status; setSelectedDeviceCount(); }, onSelectAll: function(rowids, status){ for (var i = 0; i < rowids.length; i++){ selected[rowids[i]] = status; } }
Does it help?
Justin ethier
source share