Aug 25, 2009, 1:28 PM
Enable/Disable Tabs within UpdatePanel
Hi there,
Hope someone can help me on this one:
I am trying to enable/disable the tabs of my TabPanel on my DetailsView ItemInserted event.
The following code works let's say on Page_Load, but it doesn't work on DV ItemInserted.
The reason I am using AddScript instead of Server Method is because the tabs are in my parent UpdatePanel which is not being refreshed at that moment.
Can anyone guide on this, please?
Thanks
Leo.
Hope someone can help me on this one:
I am trying to enable/disable the tabs of my TabPanel on my DetailsView ItemInserted event.
The following code works let's say on Page_Load, but it doesn't work on DV ItemInserted.
The reason I am using AddScript instead of Server Method is because the tabs are in my parent UpdatePanel which is not being refreshed at that moment.
Can anyone guide on this, please?
foreach (TMSTab tb in TabPanel2.Tabs)
{
if (!tb.Title.Trim().Equals("Details"))
{
string sExtScript = string.Empty;
if (itm == 0)
sExtScript = string.Format("Ext.getCmp('{0}').setDisabled(true);", tb.ClientID);
else
sExtScript = string.Format("Ext.getCmp('{0}').setDisabled(false);", tb.ClientID);
Coolite.Ext.Web.ScriptManager.GetInstance(this.Page).AddScript(sExtScript);
}
}
Thanks
Leo.