0
answers
0 votes 1
view

Tags: SQL
Plz help me out to resolve a conflict. I have made untiring efforts to resolve but coudln't. I have showed my data in gridivew now in windows forms now i want that when i make chages on the gridview using it like an excel sheet. These changes should also be reflected back in database. I have used this code.

da = new SqlDataAdapter();
cb = new SqlCommandBuilder(da);
myGridView.DataSource = ds.Tables["UserDetails"];
ds.AcceptChanges(); da.Update(ds, "UserDetails");
con.Close();

what's wrong? how can i edit specific cell values.