Say I have loaded 150 lines locally (datatype: "local"), with (multiselect: true, multiPageSelection: true) - multiPageSelection is a great way for selecting across a certain page.
Now, I have the page size set to 50. So that gives me 3 pages overall.
I click to select all lines (all 150 across all 3 pages - it is feasible because of the multiPageSelection flag).
var selRowIds = jQuery(id).jqGrid ('getGridParam', 'selarrrow');
The above line will indeed retrieve all 150 rows id.
But, when iterating over each row id:
for(elem in selRowIds) {
obj.items.push(jQuery(id).getRowData( selRowIds[elem] ));
}
I'm only getting valid rows values for the rows within the active page (the page I'm currently at), not for those rows that are on any other page.
I'm using version 4.15.5.
Thanks,
Tal.
The method getRowData return the row of the data in the current view. The method is used usually if the datatype is json or xml.
In case of datatype local the recommended method is getLocalRow. The code then should look like.
for(elem in selRowIds) {
obj.items.push(jQuery(id).getLocalRow( selRowIds[elem] ));
}
This is described here