Reputation: 6760
After dozens of answers in the ExtJS/Sencha category, here is my first question for all you ExtJS experts -:)
In my Ext.application.launch
, I am doing something like this -
Ext.data.StoreManager.lookup('store_id').sorters.add(new Ext.util.Sorter({
property : 'field name',
direction: 'DESC'
}));
After this, when I load the store, the sort info is passed to the server as expected. (Its a Direct Store) No problems here.
The problem is - I have a grid that is backed by this store and this "sort info" is not reflected on the grid view the way it is reflected if I manually sort on a column in the grid. (i.e. I don't see the sort icons on the corresponding column)
Is there way to decorate the grid columns with appropriate sort icons based on store's sorters?
Thanks for looking at this.
Upvotes: 0
Views: 4368
Reputation: 34
Better late than never :) Instead of filtering the store itself, do
{grid column}.setSortState('ASC', true, false);
Upvotes: 1