Jul 12, 2016, 11:23 AM
"SetActiveItem" of a MenuPanel does not work from my MVC CONTROLLER
Hi, i have a panel with collapsibles subPanels like this:
and in my chrome console appear next error: "this.getLayout(...).setActiveItem"
If i execute this javascript command from the Chrome console, this work fine:
Any idea about this error?
thanks in advance
X.Panel().ID("LeftPanel")
.Items(items1 =>
{
items1.Add(
Html.X().MenuPanel().ID("SubMenu")
.Region(Region.West)
.Width(200)
.Menu(menu =>
{
menu.ShowSeparator = false;
menu.Add(
Html.X().MenuItem().ID("MyFirstItem")
);
}));
...
From my controller i call this:this.GetCmp<MenuPanel>("SubMenu").SetActiveItem(0);
and in my chrome console appear next error: "this.getLayout(...).setActiveItem"
If i execute this javascript command from the Chrome console, this work fine:
App.SubMenu.setSelectedIndex(0)
But i need execute it from my controller with C#Any idea about this error?
thanks in advance