DataGridView data into a DataTable

joe_pool_is

Well-known member
Joined
Jan 18, 2004
Messages
451
Location
Texas
I have a lot of data already displayed in a DataGridView object.

To sort it, add custom rows, etc., my plan is to take all of that data and copy it over to a DataTable object, manipulate it, then just copy it back over to the DataGridView object
// dataGridView1.DataSource = dataTable1.DefaultView;

However, I cant seem to find a way to get the data from the DataGridView object over to the DataTable object. Everything I try says the DataTable method is Read Only.

Does anyone know how to do this?

Regards,
Joe
 
Back
Top