How to add the GridView Cells data into a two dimensional list and retrieve it
问题 I'm iterating through the GridView rows and cells to get the values and store them in a 2D array . This is my code: for (int i = 0; i < GridView2.Rows.Count; i++) { for (int j = 0; j < (GridView2.Rows[i].Cells.Count - 3); j++) { // using the labels of the template fields..... Label values = (Label)GridView2.Rows[i].Cells[j].FindControl("Label" + j); GridValues[i,j] = values.Text; // gridvalues is my 2d array. } } What I need now is to make the same values I got from the above loop to be added