wpf - Fill Dataset From DataGrid -
When a dataset is tied to the datagrid, then what property holds a dataset;
If it is; So can this dataset return to the dataset?
I do not think there is an asset which gives the dataset from the datagrid?
If you have a datagrid in xaml:
& lt; Grid & gt; & Lt; DataGrid AutoGenerateColumns = "True" Height = "200" Horizontal Alignment = "Left" margin = "41,32,0,0" name = "DataGrid1" vertical element = "top" width = "200" /> & Lt; / Grid & gt; and you are assigning the dataset to the dataset like:
dataGrid1.ItemsSource = ds.Tables [0] .AsDataView (); Then you can do the following:
DataTableDT = (DataView dataGrid1.ItemsSource) .toTable (); Dataset dsNew = new dataset (); DsNew.Tables.Add (DT); You will catch the DSNE table with a datagrid.
Comments
Post a Comment