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
1440
Getting Exception sometimes when setting row.Fixed = true
posted

Hi,

This is happening when I ungroup a column (in UI) and pin a row (in code) in AfterSortChange event.

Any ideas to avoid this? Thanks! 

Message: System.ArgumentException: Row must be from the associated RowsCollection.
Parameter name: row
   at Infragistics.Win.UltraWinGrid.FixedRowsCollection.ValidateRow(UltraGridRow row)
   at Infragistics.Win.UltraWinGrid.FixedRowsCollection.Insert(Int32 index, UltraGridRow row)
   at Infragistics.Win.UltraWinGrid.FixedRowsCollection.Add(UltraGridRow row, Boolean top)
   at Infragistics.Win.UltraWinGrid.UltraGridRow.set_Fixed(Boolean value)
  

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    It looks like you are setting the Fixed property on a row that no longer belongs to the colletion. This might be because the sorting is done asynchronously. If that's the case, try calling your code from a BeginInvoke rather than directly inside the event. That might cause a delay so that the rows will be valid at that point. 

Children