v2.0 - Setting default sort on initial render of grid
I am trying to render the grid with a column already sorted by default.
I'm testing in IE only (for now).
I've tried, as suggested in the forum, the following:
In V2.0b1 this will show the sort indicator in the column header but will not sort the data in the column. In V2.0b2 this will show the sort indicator for an instant and then revert back to the original column header (without the sort indicator shown).
Is there a new sequence of events for rendering in V2.0b2??
I then tried the following:
In V2.0b1 this will show the sort indicator in the column header but clears all my data from the grid instead of sorting the column. In V2.0b2 the effect is the same as described earlier i.e. no sorting and sort indicator appears for an instant.
Finally, in both beta1 and beta2 if I allow the grid to load and call
in the onClick event of a button everything works as expected: Sort indicator is visible and the data is actually sorted.
Alex, do you have a workaround for this issue? Anyone else having this problem or am I doing something stupid?
Also, I'm wondering if correct sorting based on the column type (i.e. number, string, date (any date format)) will be implemented in the final release??
// set new sort indicator this.setSortColumn(index); this.setSortDirection("ascending", index); ///<<<<<
Actually my original post had an error in the code :(
myGrid.setSortDirection("ascending"); should have read
Have tried this dude. No joy for sorting before grid is rendered!
obj.sort (6, 'descending');
It's not beautiful, but it works on over 2000 rows XML data.
This topic is archived.
Back to support forum
Version 2Looking for AW 2.6 ?
The old site is here.