Database & Datagrid issues

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
 
I

Izzy

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
 
C

Cor Ligthert [MVP]

Warex,

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

Use the DataGrid.Datasource.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top