Enable Textbox on Gridview
-
Hi, I have a gridview with a textbox template field. On two pages I need this textbox to be enabled but on a third page it must be disabled. What is the best way to do this? My gridview is a user control. Right now I'm doing this:
If I change enabled to true then on all the pages the textbox is editable. Is there a way I can call the textbox property in the user control to enable or disable the textbox? For example (this isnt working though):
public bool EnableTextBox
{
get
{
return txtSize.Enabled;
}
set
{
txtSize.Enabled=Value;
}
}Please help! Thanks =)
-
Hi, I have a gridview with a textbox template field. On two pages I need this textbox to be enabled but on a third page it must be disabled. What is the best way to do this? My gridview is a user control. Right now I'm doing this:
If I change enabled to true then on all the pages the textbox is editable. Is there a way I can call the textbox property in the user control to enable or disable the textbox? For example (this isnt working though):
public bool EnableTextBox
{
get
{
return txtSize.Enabled;
}
set
{
txtSize.Enabled=Value;
}
}Please help! Thanks =)
The obvious way is to set your enabled property from a code behind property, and then set that in code.
Christian Graus Driven to the arms of OSX by Vista.
-
Hi, I have a gridview with a textbox template field. On two pages I need this textbox to be enabled but on a third page it must be disabled. What is the best way to do this? My gridview is a user control. Right now I'm doing this:
If I change enabled to true then on all the pages the textbox is editable. Is there a way I can call the textbox property in the user control to enable or disable the textbox? For example (this isnt working though):
public bool EnableTextBox
{
get
{
return txtSize.Enabled;
}
set
{
txtSize.Enabled=Value;
}
}Please help! Thanks =)
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
if (e.NewPageIndex == 2){ } // Disable here
else{ } // Enable here
GridView1.PageIndex = e.NewPageIndex;
BindData();
}TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can