0

I have a problem my grid

The problem is my grid is not a loadonce so the toggle search is not working well,but when I change the loadonce:true,it works perfectly.

NOw my question is,how can I stop the toogle search not to request on server?

Thanks

joni_demon
  • 656
  • 6
  • 12

1 Answers1

0

There are only two possibility: either jqGrid hold local data and it can do sorting, paging and filtering (searching) locally or the server have to do this. jqGrid hold the data locally in internal options data and _index only if the datatype is not 'json' and not 'xml' or if the option loadonce: true are used.

So if you use datatype: 'json' or datatype: 'xml' and you still need to have local searching you have to use loadone: true. In the case the internal options data and _index will be filled and the datatype will be changed to 'local' after the first loading of data from the server. If you will need later to reload the data from the server you can reset the datatype to its original value ('json' or 'xml') with respect of setGridParam (see here for example) and trigger "reloadGrid" event (see here).

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