This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
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 Gordon |
|
|
Hello Gordon 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. Jason Fauchelle |
|