Ananth
Ananth

Reputation: 10700

Tranfer Data from Datagrid to DataTable

I have a DataGridview and it has its data source as a Data-table. Now I have added another DataGridViewTextBoxColumn in the datagridview where user can enter details. So now the source Data-table doesn't contain this column but the datagridview has .

I need to have the entire datagridview columns in a Data-table(either the source Data-table or else a new Data-table). Is it possible ? Thanks in Advance

Upvotes: 1

Views: 492

Answers (1)

roto
roto

Reputation: 677

Can you modify the DataTable before you bind it to the DataGridView? You should be able to add a new column to the DataTable, set it to editable then bind to the DataGridView. Now updates to the DataGridView will be transfered back to the DataTable.

Upvotes: 2

Related Questions