Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
Sorting checkboxes problem
posted

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
Parents
No Data
Reply
  • 469350
    Offline posted

    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.

Children
No Data