I have a DataGrid that binding an ObservableCollection of self tracking entities
Users can “delete” records in the DataGrid, however the items don’t actually get deleted from the database.
How can I only display rows that aren’t marked as deleted?
I am using MVVM pattern.
Maybe it’s a little bit more information then you’re after, but I was met with the exact same case and chose to display rows as greyed out, or ‘redded’ out when their state is toggled to deleted. You trigger properties and style target type might be a little different since I’m using an Xceed DataGrid and you’re using the built-in Datagrid, but it’ll be essentially the same: https://stackoverflow.com/a/10431650/529618
For what it looks like, check out the last 3 images in the combined image below: