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
560
Possible bug in BeforeSortChangeEventArgs and BandEventArgs
posted

Hello,

I have this line in BeforeSortColumn and AfterSortColumn event code:

m_LastSortColumn =

Me.UltraGrid1.DisplayLayout.Bands(e.Band.Index).Columns(e.SortedColumns(index).Key)

e.SortedColumn(index).Key correctly reports the Key. e.SortedColumn(index).Index returns -1 instead of the actual column index. Is this a bug in the event args?

Parents
  • 469350
    Suggested Answer
    Offline posted

    I assume you mean BeforeSortChange and AfterSortChange, as the event names you are using here do not exist.

    Which event exactly is giving you a -1 for the index? Both?

    The SortedColumn collection in the event args represents two different things depending on which event you are using, so it's hard to say without knowing which event you are referring to.

    And what index are you passing in?

    Is the column visible?

Reply Children