PDA

View Full Version : how do I get my sort criteria from my grid?



Mulvihic
6 Dec 2013, 8:52 AM
Hi,
how do I get my sorting criteria from my grid store e.g. sort by ColX DESC.

scottmartin
6 Dec 2013, 9:37 AM
You can use the sorters object to get the sort array



store.sort('name', 'ASC');
console.log(store.sorters.items[0]);



{property: "name", direction: "ASC", root: "data", transform: undefined, sort: functionů}

Mulvihic
8 Dec 2013, 6:55 AM
Thanks- that worked a treat.