Here is my theory

Maybe having items leave a list cause of a filter change to a DataView does not cause the ItemChange event to fire.

For the added items, you need to have the RowStateFilter include Added, the OriginalRows does not. If you don’t the Added Items to the datatable will only appear when Update is called on the table.

I am still not 100% sure why I was having trouble when the RowStateFilter for the DataView = CurrentRows. I guess when I set the Row flag to deleted, the state filter would remove them from the data view, but not cause the ItemChanged event to fire.

Basic lesson, include both DataViewRowState.Added and  DataViewRowState.Deleted in your DataView.RowStateFilter when you are binding that data view to any panel based on the V irtualizingPanel. If you don’t you may end up with an exception because the panel didn’t get an event telling it that an item changed and it no longer needs to worry about virtualizing it.

Leave a Reply