v2.0 - Setting default sort on initial render of grid
Hi,
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:
myGrid.setSortColumn(1);
myGrid.setSortDirection("ascending");
myGrid.refresh();
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:
myGrid.sort(1, "ascending");
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
myGrid.sort(1, "ascending");
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??
Many thanks,
BT
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:
myGrid.setSortColumn(1);
myGrid.setSortDirection("ascending");
myGrid.refresh();
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:
myGrid.sort(1, "ascending");
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
myGrid.sort(1, "ascending");
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??
Many thanks,
BT
BT
November 10,