-
16 Sep 2009 4:40 PM #1
extracting the column content
extracting the column content
I would like the column not to get sorted if it contains the same data throughout, but I would certainly like the header to get highlighted in case of a click.
I was thinking of suppressing the event in case of equivalent column data, and still applying the style to the column's header.
Any suggestions on this/ is there any other/better way of doing this?
Thanks,Karan
-
1 Oct 2009 5:29 AM #2
your ide is good.
an other possible idea:
you can listen to the event: BeforeSort
it comes from ListStore:
in the attached store event you can access the store and look if the values are equal and then you can cancel the event.PHP Code:public void sort(String field, SortDir sortDir) {
if (!fireEvent(BeforeSort, createStoreEvent())) {
return;
}
but i see one problem there:
in the event you dont have the column for sorting :-( and not the sort direction. this makes this event useless :-( i
@sven: make it sense to add this to the event?
other solution: subclass the ListStore and check this in a overwritten sort() before calling the super.sort()
maybe there are other solutions for this.This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.
GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041


Reply With Quote