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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
srinathPosted May 19, 2010, 1:30 AM
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.
CrishPosted May 18, 2010, 1:37 PM
use grid view's row databound and find textbox using
TextBox tb=(TextBox)e.FindControl("id of the textbox");
thanks
Hirendra SisodiyaPosted May 18, 2010, 7:58 AM
You can also make that datagridView cell as read only......
thanks
Dipa AhujaPosted May 18, 2010, 7:28 AM