We have a Infragistics xamDataGrid with the DataSource bound to a BindingList. We have some custom text set on the group by header and need to reset it every time an item is added or deleted.
Is there a when to be notified when an item is deleted in the DataSource so that we can update the group by header? The insertion is easy as it has a InitializeRecord event which we can use to refresh the group by header. We’re looking for an equivalent for deletion.
Just to note, the BindingList is NOT updated in the GUI so we cannot use the RecordsDeleting and RecordsDeleted events offered by xamDataGrid.
You can use the same event that the grid you are setting the data source to uses if the data source is an
IBindingList: theListChangedevent. Alternatively if your data source also implementsINotifyCollectionChangedyou can use theCollectionChangedevent.To do this you just subscribe to the event in the same section of code that sets the data source. Something like:
and you’ll get this info in your handler:
which is described like this: