I have designed a gridview in the aspx page.In the Code Behind I could not find controls in the gridview because the gridview.rows.count=o as the gridview is not binded before.
How do i find the controls in the gridview if the gridview.rows.count=o?
Which event you are using to write the find control code?
after binding only u can get the data...before it will be 0 only know....!
after binding the data to gridview , try to count!
all the best!
sudhir.kathuriaWhich event you are using to write the find control code?
Dim tb As Label = DirectCast(Grd_List_of_Values.Rows(i).Cells(1).FindControl("lblID"), Label)
But i need to add the dataset set values to the labels,textboxes in a gridview on button_click.
BUT THESE LABELS,TEXTBOXES ARE EMPTY ITEM TEMPLATES