I have never used the Ole Db Data Adapter & Ole Db Command and am not sure what I am doing.
Keep getting this err msg at the high-lighted code, "Object reference not set to an instance of an object".
Once the Framework Element is extracted, by type casting it to the ‘Text Box’ UI element, the value changed in the cell can be read.
Here ‘Salary’ and ‘Dept No’ are changed and updated into the selected ‘Employee’ object.
So to read the edited cell value, you need to read the Cell contents using ‘Get Cell Content()’ method, by passing the Data Grid Row object to it.After making changes in "Datagridview" when user clicked "Save" button, whichever changes made in datagridview should get reflect at backend in table "Emp Details". Tables; //now u can save changes to back end with da.Use this code to populate datagridview Sql Data Adapter da=new Sql Data Adapter("select * from product",strcon); Sql Command Builder cb=new Sql Command Builder(da); Data Set ds = new Data Set(); da. Update(ds); Thanks It is working fine if there is single table in dataset.I am filling "Datagridview" with table "Emp Details".When user clicked "Edit" button he should allowed to make changes in "Datagridview".