Gridview rendering Issue
-
Hi all i have binded data with gridview in presention point view it is working but while inserting the data to DB and iam traversing the girdview iam getting the index missing . please guide me where iam doing wrong DataTable dataTable = new DataTable(); dataTable.Columns.Add(new DataColumn("StudentID", Type.GetType("System.String"))); dataTable.Columns.Add(new DataColumn("StudentName", Type.GetType"System.String"))); dataTable.Columns.Add(new DataColumn("MajorName", Type.GetType("System.String"))); dataTable.Columns.Add(new DataColumn("StudenMarks", Type.GetType("System.Int16"))); dataTable.Rows.Add(new string[] { "1","Student1","English"}); dataTable.Rows.Add(new string[] {"2", "Student2","English"}); dataTable.Rows.Add(new string[] { "3","Student3","Hindi"}); dataTable.Rows.Add(new string[] { "4", "Student4","Hindi"}); dataTable.Rows.Add(new string[] { "5", "Student4","Hindi"}); GridView1.DataSource = dataTable; GridView1.DataBind(); AND my gridview looks like the below And on Row Data bound event i have the below code stri