Re: How to save Datatable
It's not working for a number of reasons. I suggest that you follow the CodeBank link in my signature below and check out my thread on Retrieving & Saving Data to see how to use a data adapter and a DataTable. After populating the DataTable, you can bind it to a BindingSource and then bind that to the grid, e.g.
Code:
Me.BindingSource1.DataSource = myDataTable
Me.DataGridView1.DataSource = Me.BindingSource1
When you're ready to save, call EndEdit on the BindingSource before calling Update on the data adapter.