foreach (GridViewRow gvrC in GridView1.Rows) { if (gvrC.Visible) { for (int x = 2; x < GridView1.Columns.Count; x++) { foreach (Control cc in gvrC.Cells[x].Controls) { string str = ((TextBox)cc).Text; //my code here. I want to display textbox value } } } }
foreach (GridViewRow gvrC in GridView1.Rows) { string str = ((TextBox)gvrC .FindControl("txtCC")).Text; //my code here. I want to display textbox value }
foreach(GridViewRow gvrC in GridView1.Rows) { if (gvrC.Visible) { for(int i = 2; i < GridView1.Columns.Count, i++) { String str = row.Cells[i].Text; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)