I have a WPF DataGrid associated with a set of Entity Framework objects that reside inside the parent EF object. Sort of:
<DataGrid ItemsSource="{Binding SelectedCustomer.Orders}" />
Now that I want to βdeleteβ the order, I donβt want to actually delete it from the data source, I just want to set its IsDeleted property to true so that the data is saved.
My question is: how can I get my DataGrid skip a row if this IsDeleted property IsDeleted true? I would really like to use binding, not codebehind. Something like this would be great:
<DataGrid ItemsSource="{Binding SelectedCustomer.Orders}" RowVisibilityPath="IsDeleted" />
View along the lines of DisplayMemberPath . I understand that I will need to convert the state to IsDeleted , but this is a different topic.
Any ideas?
source share