I have a DataTable that represents a SQL table. The SQL table references itself in a parent/child manner, but only one level (a parent can’t have a parent itself)
I want to bind this DataTable to a DataGrid so i can edit the rows on the DataGrid and add new Rows and this should be propagated to the DataTable. So far it’s easy.
But now i want to display only the rows that have a parent. From what i understand, if i use a CollectionView to filter the data the changes on the grid won’t be propagated to the DataTable. So how can i do that?
what happens if you try to set the defaultview Rowfilter?
ItemsSource for the DataGrid is still the datatable but it should be filtered now.