Hello, I have seen several articles on Pivoting data in a datatable to bind to a data grid. Im using the one referenced in this link:
I have the 2 datatables as in the example.
The original normalized version 'dt' with a sqldataadapter.
and the pivoted version 'pivotedTable' as the datasource for the gridview.
I would like to save the data modified in the gridview back to the database in its normalize form. Possibly using the 'dt' datatable and dataadapter.
My thoughts are:
use 'getchanges' from pivotedTable:
Dim changedRecords As System.Data.DataTable
changedRecords = dt.GetChanges
Then use 'changedrecords' datatable to update the original dt, and da.update to update the database.
My question is: is this a reasonable approach?, is there a better way?. Does someone have an example.
Im using winforms and vb.net but c++ is ok also.
thanks very much.