Home Forums WPF controls Xceed DataGrid for WPF bi-directional binding to dataset

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22566 |

    hi there,

    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 🙂

    b.greber

    Imported from legacy forums. Posted by Benno (had 3403 views)

    Xceed Support
    Member
    Post count: 5658

    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)

    User (Old forums)
    Member
    Post count: 23064

    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)

    Xceed Support
    Member
    Post count: 5658

    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)

    User (Old forums)
    Member
    Post count: 23064

    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)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.