PDA

View Full Version : Ext.grid.Panel sort order



Skelotron
7 Oct 2014, 9:59 PM
How can i rename sort order "Sort Ascending", "Sort Descending"?
50598

scottmartin
8 Oct 2014, 6:50 AM
Look at the Ext.grid.Panel-cfg-sortableColumns config on the grid. Just set to false.

watertrac_dev
8 Oct 2014, 9:03 AM
How about this?

bgg

Skelotron
8 Oct 2014, 10:24 AM
Yes it's what i'm looking for. Thanks, whatertrac_dev

scottmartin
8 Oct 2014, 11:17 AM
I read that complete wrong .. I read disable menu for some reason. Too early in the morning I guess.

Phil Guerrant
8 Oct 2014, 3:17 PM
A little-known fact is that the columns config is actually a way to configure the HeaderContainer.



columns: [
...
]


is just shorthand for:



columns: {
// HeaderContainer configs here
items: [
// column definitions here
]
}


So you could configure sortAscText and sortDescText this way if you only needed to change it for an individual grid instance. The override is still your best bet if you need to change these configs globally

watertrac_dev
9 Oct 2014, 11:04 AM
Thanks for pointing that out. I was initially trying to apply the updated sortAscText and sortDescText against a single column's config, but wasn't having any luck. That's when I proposed the override. Guess the best solution depends on what the overall goal is.