Skip to content Skip to sidebar Skip to footer

Jqgrid: Get Elements From Different Pages

I have a JQGrid with 24 elements, 10 elements by page. When I run the following line, being on the 3rd page: var idList = $(MyList).getDataIDs(); I can only get the 4 elements fr

Solution 1:

It you datatype: "local" or if you use remote data source (datatype: "json" or datatype: "xml") together with loadonce: true then data and _index parameters will be filled. The option data is array of items. The option _index is an object which properties are id values of the loaded data. You can use for loop to iterate over all ids. See the answer or this old one for more information. In some scenarios it would be practical to use getLocalRow method to access items from data array by id.


Post a Comment for "Jqgrid: Get Elements From Different Pages"