5
Answers

How to add/update/delete more than 1 record in datagrid at one go i.e. how to handle batch updates

amit_gupta14

amit_gupta14

20y
3.7k
1
In C# windows application: There is a datagrid. I add more than 1 record. How can I save all these records in table at one go? Similary for update/delete I am currently using the following code to handle one record: int aa=Int32.Parse(dataGrid1[dataGrid1.CurrentRowIndex,0].ToString()); string ss=dataGrid1[dataGrid1.CurrentRowIndex,1].ToString(); string ins="Insert into test values("+aa+","+"'"+ss+"')"; dt=cc.conn(ins); dt.AcceptChanges();
Answers (5)