I have a datagrid which displays the values from the Dataset. The Dataset
values are not sorted alphabetically. So the datagrid initially displays the
values in an unsorted manner. Only when I click on the header of the datagrid
the values are displayed in assorted manner. I want the datagrid to display the
values in alphabetical order when it is loaded with the values. Can this be
done ?
If so, anyone please let me know how to do that .
TroyK - 21 Dec 2006 22:32 GMT
Looks like you want to use the addSort function of the DataSet. So before you
assign the dataset to the datagrid you would run something like this.
my_ds.addSort("nameSort", ["name"], DataSetIterator.Descending);
Later
Troy
srirama.83 - 22 Dec 2006 08:53 GMT
Thanks a lot,
I Used an array as the dataset for datagrid and i used the sortOn() Function of Array.
And this worked .