Hi
I want to sort a column when my wingrid initializes, this is what I have tried....
grid.DisplayLayout.Bands(0).Columns("Selected").SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Ascending and grid.DisplayLayout.Bands(0).SortedColumns.Add("Selected", True)The sort indicator is diplayed in the header but the column is not sorted.Any ideas?Thanks
Hi,
In what event are you calling this code? My best guess is that you are sorting the column before it has any data in it. Setting the SortIndicator doesn't continually sort and re-sort your data, it's a one-time operation, so you have to make sure the data is loaded first.
I recommend setting adding the column to the SortedColumns collection either in the InitializeLayout event of the grid, or else immediately after you set the grid's DataSource and DataMember.