Update detached datagrid to SQL DB
Posted on 2007-03-23
After populating a datagrid with a button I want to detach it from it's underlying dataset table so changes in the datatable do not show immidiatly on the datagrid.
This part I got done by filling a temp. dataset/table from the DB and refer the datagrid.datasource to the temp datatable.
Now I want to save changes made to the datagrid back to the DB. Since the reference for the dataset/table is missing my update throws an exeption.
How can I reconnect to the database and update rows in the DB with DataRowState.Modified after the datagrid got detached from its filling dataset/table?