G
Guest
I need some help please.
Say you have a DataGrid and a DataSet, and you create a dataview to handle
sorting and filtering and then you assign the dataview to
DataGrid.DataSource. Once you did that you will get InvalidCastException if
you do this:
DataSet dataSet = (DataSet) dataGrid.DataSource;
But I need to do that because I need to get the DataGrid's dataentries in a
dataset and use XmlDataDocument to load the dataset and then write it to an
xml file.
Maybe my first design decision to assign dataview to the datasource should
be reviewed. I don't know. Any comment will really help.
Thank you.
Say you have a DataGrid and a DataSet, and you create a dataview to handle
sorting and filtering and then you assign the dataview to
DataGrid.DataSource. Once you did that you will get InvalidCastException if
you do this:
DataSet dataSet = (DataSet) dataGrid.DataSource;
But I need to do that because I need to get the DataGrid's dataentries in a
dataset and use XmlDataDocument to load the dataset and then write it to an
xml file.
Maybe my first design decision to assign dataview to the datasource should
be reviewed. I don't know. Any comment will really help.
Thank you.