0

I need to get only the data that is a result of the search as opposed to the entire set.

This code gives me the entire set:

 var data = $("#my-grid").getGridParam("data");
halfer
  • 19,824
  • 17
  • 99
  • 186
sarsnake
  • 26,667
  • 58
  • 180
  • 286

1 Answers1

0

The answer on your question depends on which fork of jqGrid and which version you use. If you use free jqGrid (4.8/4.9) then use lastSelectedData parameter instead of data. You will get the subset of filtered and sorted data (all data, not just the current page!!!). See the readme and the first demo at the end of readme.

If you have to use old jqGrid versions then you can follow the answer which shows how one can subclass internal method $.jgrid.from to be able to save the results of the last select over the local data.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798