Home › Forums › WPF controls › Xceed DataGrid for WPF › bi-directional binding to dataset
how can i save the changes i’ve made to the datagrid, back to the source-dataset?
as far, i have bound the grid to the dataset through the itemssource property. do i have to use a different binding method to get it work like mentioned above?
thx for answers 🙂
Imported from legacy forums. Posted by Benno (had 3403 views)
Are you meaning that changes made with the DataGridControl on a data table cannot be seen on the data table itself?
Or are you meaning that you want to update the actual database with changes made to the data table?
Imported from legacy forums. Posted by Marcus [Xceed] (had 237 views)
hmm .. maybe i am completly wrong 🙂
if i bind a datatable to the datagridcontrol (using the datagridcontrol.itemssource property), are the changes made to the grid also made to the according datatable?
Imported from legacy forums. Posted by Benno (had 281 views)
Yes, changes are made to the DataTable, we interface with the DataRowView items created by the DataView for your DataTable directly ( BeginEdit, changes, EndEdit, …).
However, the changes made to the DataTable are not propagated automatically to the database, you will need to update the database yourself (DbDataAdapter.Update() ).
It is however possible you are experiencing a bug… So I just wanted to confirm your intentions 😉
Can you confirm if the DataTable bound to the ItemsSource is updated when a Row is edited in the DataGridControl?
Imported from legacy forums. Posted by Marcus [Xceed] (had 319 views)
first of all, thank you for your fast replies..
now i can confirm that the data table is updated correctly if i change data in the grid 🙂
Imported from legacy forums. Posted by Benno (had 4545 views)