Database & Datagrid issues

  • Thread starter Thread starter Warex
  • Start date Start date
W

Warex

Hello I am having a problem with using the datagrid.
I am attaching my data through a dataset via code to a
datagridview.datasource.
All if fine except if I make any changes to the datagrid the changes never
reflect in the database.

Does anybody have a sample/example of how to use the datagridview with code
not the wizard?

thanks
 
You'll need to update the database with the changes made to the
datatable the grid is bound too.

Check out DataTable.GetChanges() method to get a copy of the changes
that were made since the table loaded or since the
DataTable.AcceptChanges() method was last called.

Izzy
 
Warex,

If you want to use the Datagrid than you should not connect to the
DataGridView.Datasource,

Use the DataGrid.Datasource.

Cor
 
Back
Top