hi,
i have a textbox in a gridview which is inturn in panel.
my problem is i want to disable the textbox on pageload.
i tried to find the textbox control in a grid view but i couldn't
plz help me
Textbox
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Dipa AhujaRank #1,168 · 1.5K reputationPosted May 18, 2010, 3:28 AM EDT
Hirendra SisodiyaRank #258 · 9.8K reputationPosted May 18, 2010, 3:58 AM EDT
You can also make that datagridView cell as read only......
thanks
CrishRank #1,487 · 1.1K reputationPosted May 18, 2010, 9:37 AM EDT
use grid view's row databound and find textbox using
TextBox tb=(TextBox)e.FindControl("id of the textbox");
thanks
srinath133 reputationPosted May 18, 2010, 9:30 PM EDT
Mr.crish I have done what u said previously, then also i am unable to find the control.
this is my code,
GridView gv = panel.FindControl("GridView1") as GridView;
foreach (GridViewRow k in gv.Rows)
{
TextBox txtbox = k.FindControl("paidstat") as TextBox;
txtbox.Text = "hi";
}
plz help me.