PDA

View Full Version : What is the logic behind the column header sort action?



JackJohnson321
26 Feb 2014, 6:33 PM
Basically, how can I use a toggle btn I have added in the grid tbar to sort a grid with only one column? The column header has been intentionally hidden so theres no drop down with the sort ascending/descending options.

Thank you

scottmartin
27 Feb 2014, 6:05 PM
You can place a sort on the store:



//sort by a single field
myStore.sort('myField', 'DESC');

//sorting by multiple fields
myStore.sort([
{
property : 'age',
direction: 'ASC'
},
{
property : 'name',
direction: 'DESC'
}
]);