Hi There, We have an application need to use System.Data.DataView as the datasource/itemssource for the DataGrid. But the DataGrid does not take it now.
Since you put in the DataTable as datasource/ItemsSource, it probably very easy for you guys to add in a converter for the DataView... and change it back to DataTableWrapper.
We found DataView.ToTable() function but every time when the field in the DataView changes, I need to call the function to get new DataTable which is extremely inefficient.
We cannot use DataView.Table property since we want to bind the datagrid to DataTable.DefaultView and the DataTable.DefaultView can be changed to defferent contents when we apply some filter to DataTable. And DataTable.DefaultView.Table == DataTable. which will not reflect any changes of the filter.
So we really need you guys add the feature to take DataView for the DataGrid.
Thanks a lot
Thanks for the feature request. The DataGrid will support DataView as an items source in the next nightly build. Note that unlike the DataTable, you will not need a wrapper or converter to set the ItemsSource property. This is because DataView is an IEnumerable, and so you can set the ItemsSource just like with a standard list/collection.