Sep 14, 2008, 4:19 AM
[CLOSED] setting Visible to False on Tab causes js error
following some of the advice, i am now trying to create a number of tabs in the OnInit event says 10 tabs and setting the Visible property to False. however when i do that (using 0.5.4) i get the following javascript error
this is the code used to create the tabs
: missing
from debug {id:"pnlContent",region:"center",items:{id:"CenterPanel",xtype:"tabpanel",items:[{id:"tbHome",title:"
Home
",contentEl:"tbHome_Content"},{xtab0_ClientInit},{id:"xtab1",title:"xtab1",border:false,closable:true}
you can see xtab0 is the tab i set visible to falsethis is the code used to create the tabs
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
string id = "";
for (int i = 0; i < 10; i++)
{
id = string.Concat("Tab", i.ToString());
Tab tab = new Tab(id, id, id);
tab.Visible = false;
this.TabPanel1.Tabs.Add(tab);
}
}
thank you in advance for your help. also, if I was using client side, what is best practice to save state stave and restore the tabs ona postback.