FindControl not working...
hi,
i got this datagrid:
[code]
[/code]
when i try to get the text from the ID column :
[code]
TextBox text = (TextBox)e.Item.FindControl("Id");
string a = text.Text;
[/code]
i get nothing.
why is that?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

karthika b2 reputationPosted Nov 21, 2007, 1:53 AM EST
udaya kumar9 reputationPosted Nov 22, 2007, 2:11 PM EST
Hi,
Do u need to get the text of the particular column?
if so, we can just use "datagrid.rows[0].cells[0].text" like this.........
"FindControl" can be used only when there is any other control in the datagrid.
Regards,
Udhay