Hi,
Within a FormLayout, When trying to hide a field that has a label (by using any of the Hide(), SetVisible() methods) , the label stays visible.
Can I hide a field (within a FormLayout) with its label?
Thanks.
Printable View
Hi,
Within a FormLayout, When trying to hide a field that has a label (by using any of the Hide(), SetVisible() methods) , the label stays visible.
Can I hide a field (within a FormLayout) with its label?
Thanks.
If anyone is interested: My solution (at least for ComboBox and TextField) is calling the next method (which I wrote) with the field that we want to hide as a parameter:
Code:public static void HideFormLayoutField(Coolite.Ext.Web.WebControl field)
{
if (field is Coolite.Ext.Web.ComboBox)
{
field.AddScript("try {{ Ext.get('{0}').dom.parentNode.parentNode.parentNode.style.display='none'; }} catch(e) {{ }}", field.ClientID);
}
else if (field is Coolite.Ext.Web.TextField)
{
field.AddScript("try {{ Ext.get('{0}').dom.parentNode.parentNode.style.display='none'; }} catch(e) {{ }}", field.ClientID);
}
}