Mar 09, 2016, 3:02 PM
Access TabPanel's Tabs in Controller.
Hello.
I have a View with a TabPanel in a CSHTML file.
I need to acces to the tabs to close someone or different operations when i click on a Button.
The Controller code is like:
Why? I have 5 tabs opened.
If i write
But why the count is 0 and i can't do the for?
Any Idea?
I have a View with a TabPanel in a CSHTML file.
X.TabPanel()
.ID("TabPanel1")
.Region(Region.Center)
.Plugins(X.TabScrollerMenu().PageSize(100))
I need to acces to the tabs to close someone or different operations when i click on a Button.
The Controller code is like:
public ActionResult onClick(string tabName)
{
TabPanel tabPanel= this.GetCmp<TabPanel>("TabPanel1");
foreach(AbstractComponent tab in tabPanel.Items)
{
}
return this.Direct();
}
But tabPanel.Ãtems count is 0.Why? I have 5 tabs opened.
If i write
tabPanel.CloseTab(0, CloseAction.Destroy);
i can close the first tab.But why the count is 0 and i can't do the for?
Any Idea?