How to Update the Records in GridView Control Through Coding in asp.net2.0
-
Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth
Chandrakanth
u mean u want to update records in databases through gridview??
software student
-
Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth
Chandrakanth
i didnt understand ur query..however this code may help u updating records in databases if changes are made in datagrid this code will b behind update button for (int i = 0; i <= editgrid.RowCount - 1; i++) { str = "UPDATE table SET column1 = '" + editgrid.Rows[i].Cells[1].Value + "', column2='" + editgrid.Rows[i].Cells[2].Value + " WHERE cid = " + editgrid.Rows[i].Cells[0].Value; SqlCommand com = new SqlCommand(str, conn); com.ExecuteNonQuery(); }
software student
-
Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth
Chandrakanth
Hi, Once again This is from Chandrakanth. Actually i am using GridView Control in ASP.NET2.0 I want to update the records in databases through GridView Control by using Coding in the CSharp. not through Properties. Thanks for Reaponse. Thanks& Regards Chandrakanth
Chandrakanth