PDA

View Full Version : gridpanel and remote sort



Drake
10 Oct 2010, 9:52 AM
Hi,
I guess this is rather a trivial question, but still, I just don't know how to manage:
I have a gridpanel with server-side sorting which works fine with hard-coded values, like:


.. sort:'id', dir:'ASC'

My gridpanel shows about 10 columns and I would like to implement sorting for each column on server-side.
Now my problem is that I don't know how to get the column name and the sorting direction, respectively.
How do I push forward the 'Sort Ascending or Descending' choice as well as the actual clicked gridpanel column header?

Thanks in advance

plalx
10 Oct 2010, 10:19 AM
Use remoteSort: true, as a config option on the store. By default, the sort field will be passed as 'sort' param and the direction will be passed as 'dir' param. You can also use the paramNames config option to change the name of the parameters.

Drake
10 Oct 2010, 11:58 AM
I knew it's a trivial problem! ... It's working ...
Thanks a lot! I appreciate your help!