PDA

View Full Version : Re-sorting grid column triggers GET request each time



mfearby
14 Sep 2009, 4:03 AM
I'm evaluating Ext-JS and have only just managed to get a gridpanel loading records from a PHP script that outputs JSON data. My question relates to why clicking on the column header to re-sort the column triggers a GET request each time? I'm familiar with jQuery and the tablesorter plugin which can resort table data locally without any server round-trips, and that's what I thought these Ext-JS grids would be.

I'm obviously missing something, but there are just so many docs to wade through and the structure of Ext-JS so unbelievably unforgiving to the uninitiated, that I just have to ask what may very well be a silly question, sorry. Any ideas?

evant
14 Sep 2009, 4:36 AM
Have a look at the remoteSort property on the store. That should clear it up.

mfearby
14 Sep 2009, 4:45 AM
Have a look at the remoteSort property on the store. That should clear it up.

Hmm. The example I was playing with even had a "remoteSort: true" in there but I seem to have overlooked that. I was also looking in the docs under "gridpanel" for help on sorting. I'm sure I'll just get used to this eventually. Thanks for the reply.

evant
14 Sep 2009, 4:51 AM
The store takes control of the sorting, the grid is just used to display the underlying data.