Hi All,
I am generating a Gridview with Custom controls (Text boxes) as per the user input during the run time. when i try to access the data in those text boxes, its not happening
I had triggered this operations with the Button and the code is as follows:
for (int rowCount = 0; rowCount <= gvCapacity.Rows.Count; rowCount++)
{
for (int i = 1; i < gvCapacity.Columns.Count; i++)
{
if (i > rowCount)
{
if (!(gvCapacity.Columns[i].HeaderText == "Route" && gvCapacity.Columns[i].HeaderText == "Location" && gvCapacity.Columns[i].HeaderText == "RouteLocationID"))
{
TextBox txtBox = gvCapacity.Rows[rowCount].Cells[i].FindControl("txt" + gvCapacity.Columns[i].HeaderText) as TextBox;
}
}
}
It returns the Null value when i try to access the textbox data. Can anyone help me out on this.
Regards Geeta