Posted 20 May 2024, 1:13 pm EST - Updated 20 May 2024, 1:19 pm EST
Hi,
I’m experiencing an issue with the .NET Framework version 4.6.20233.827 of C1FlexGrid. When AutoGenerateColumns=“False” and SelectionMode=“ListBox”, the C1FlexGrid.SelectionChanged event is not always being raised when the ItemsSource property changes. Similarly, the value of SelectedItems during SelectedItemChanged is unreliable.
When ItemsSource changes, the value of SelectedItems during SelectedItemChanged hasn’t been updated. When ItemsSource changes to an empty list, the SelectionChanged event isn’t raised at all.
I’ve attached a minimal reproduction:
FlexGridIssues.zip
In my use case, the C1FlexGrid is wrapped in another control with a read-only dependency property. This dependency property is being set when the C1FlexGrid’s selected items change. However, the value is becoming stale and contains items no longer in the collection because I can’t get an accurate picture of SelectedItems during any of the events.
I’m going to try registering a property changed handler for the SelectedItems property as a workaround, next.