Hi,
This is a repost to a previous question I had.
I have a WebGrid that is populated by code from a text file.
There are four columns in the grid once setup from the text file - ID,START,END,FILENAME
I wish to have the grid sorted by Column 1 which is 'Start'.
How do I do this?
I have tried the following on the webgrid:-
Me.grdSchedule.Bands(0).Columns(1).SortIndicator = Infragistics.WebUI.UltraWebGrid.SortIndicator.AscendingMe.grdSchedule.Bands(0).SortedColumns.Add(Me.grdSchedule.Columns(1), True)
and it sorts the grid by column 1 fine, except the data underneath is not sorted. How do i sort the data underneath to match what the grid is saying?
Thanks.
Onan.
I have done the same thing and it working on my side.
I have written these following code in InitializeLayout event :
mobjCServerGrid.Bands[0].Columns.FromKey(mstrSortBy.Trim()).SortIndicator = SortIndicator.Descending;
mobjCServerGrid.Bands[0].SortedColumns.Add(mobjCServerGrid.Bands[0].Columns.FromKey(mstrSortBy.Trim()), true);