Looks like we can't reproduce the issue or there's a problem in the test case provided.
-
Sencha Premium Member
Setting the initial sorters on a store
There does not seem to be a way to set the initial sorters on a store that involves a couple of fields with DESC order.
-
Maybe you can clarify what you tried?
I just added a Store, added multiple sorters to it and then configured them. Seems to work for me.
-
Sencha Premium Member
Maybe I just don't understand how to do it then. 
Let's say, I want to set this up:
sorters: [ {
property:'nuut',
direction:'DESC'
},{
property:'name',
direction:'ASC'
}]
Since there is no sorters to set in Designer, I have to set defaultSortDirection to "DESC" and sortRoot to "nuut". However, I am not sure how to cope with the 2nd field with Designer.
-
Sencha Premium Member
I figured out how to do it... add sorters from the toolbox and do not get distracted by the rest.
Thanks!
-
Glad to see you figured it out!
-
Sencha User
Could you please give me your sample to to sort the store? I meet same question. Help me! I set store like below code, it is not working. I am using extjs 3.X
var store = new Ext.data.JsonStore({
totalProperty: "results",
url: 'department.aspx?action=read',
root: 'records', remoteSort: true,
fields: ['id', 'department', 'description',
'department',
'division',
'divisionid',
'active'],
sorters: [{
property: 'divisionid',
direction: 'DESC'
},{
property: 'department',
direction: 'ASC'
}]
});
Thanks,
Thomson