JQGRID, get all lines after filtering

I cant get all {paginated} rows after JQgrid filtering. I tried

  > var myData = grid.jqGrid('getGridParam', 'data'); 
var myData = grid.jqGrid('getRowData');

      

but the first option gives all rows and they are unfiltered rows. the second returns filtered rows, but only from the first page.

In the example script, if you enter a test on the customer columns, there are 6 filtered results, but the first option returns all 7 records, and the second only returns 5 records {i.e. from the first page only}. I need to show 6 filtered records. the results are logged to the console.

Here is the fiddle

+3


source to share


1 answer


The solution to the problem depends on the mesh fork used. The free jqGrid is a fork based on jqGrid 4.7 (see the readme and wiki for more information). The current version of free jqGrid is 4.9.

The free jqGrid supports a parameter lastSelectedData

that you can use instead data

for the information you need. See demo .



If you need to use an older version of jqGrid and cannot upgrade to free jqGrid, you can follow the answer . It shows how you can "subclass" a select

method from the inner $.jgrid.from

jqGrid class . Once the subclasses have access to the information they need.

+3


source







All Articles