Posted on: 12/29/2014 6:49:27 PM | Views : 538


Hi,
In gridview when im trying to addnew row and  sum of the textboxes it is giving me the error
private void AddNewRowToGrid() { int rowIndex = 0; if (ViewState["CurrentTable"] != null) { DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"]; DataRow drCurrentRow = null; if (dtCurrentTable.Rows.Count > 0) { for (int i = 1; i <= dtCurrentTable.Rows.Count; i++) { //extract the TextBox values TextBox box1 = (TextBox)GridView1.Rows[rowIndex].Cells[1].FindControl("TextBox1"); TextBox box2 = (TextBox)GridView1.Rows[rowIndex].Cells[2].FindControl("TextBox2"); TextBox box3 = (TextBox)GridView1.Rows[row ...

Go to the complete details ...