Apr 25, 2012, 10:33 AM
[Razor] Html.X().MenuItem() - mouse click gives javascript error.
Hi,
I can successfully implement below mentioned code also the code is working fine.
But now i am facing two issues. which is
1. while clicking any area in Menupanel body it is giving one strange javascript error (Refer: ext_ArrowClick.JPG)
2. I am not able to collapse that particular menupanel that also give some javascript error (Refer: ext_bodyClick.JPG)
Regards,
Mukesh Selvaraj
I can successfully implement below mentioned code also the code is working fine.
But now i am facing two issues. which is
1. while clicking any area in Menupanel body it is giving one strange javascript error (Refer: ext_ArrowClick.JPG)
2. I am not able to collapse that particular menupanel that also give some javascript error (Refer: ext_bodyClick.JPG)
@using Ext.Net.MVC
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
@Html.X().ResourcePlaceHolder(Ext.Net.ResourceMode.ScriptFiles)
<title>Accordian Layout</title>
</head>
<body>
@Html.X().ResourceManager()
@(
Html.X().Window()
.Title("<span class="highlight">MenuPanel</span>")
.Width(600)
.Height(370)
.Layout(Ext.Net.LayoutType.Border)
.AutoShow(true)
.Items(widowitems =>
{
widowitems.Add(
Html.X().Panel()
.Width(350)
.Layout(Ext.Net.LayoutType.Accordion)
.Split(true)
.Region(Ext.Net.Region.West)
.Margins("5 0 5 5")
.Border(false)
.Items(panelitems =>
{
panelitems.Add(
Html.X().MenuPanel()
.Title("<span class="highlight">MenuPanel</span> with Selection Saving")
.Icon(Ext.Net.Icon.ArrowSwitch)
.Menu(menu =>
{
menu.Items.Add(
Html.X().MenuItem()
.Text("item 1")
.Icon(Ext.Net.Icon.ArrowSwitch)
);
})
);
})
);
widowitems.Add(
Html.X().Panel()
.ID("pnlCenter")
.Title("Selected Item")
.Padding(5)
.Region(Ext.Net.Region.Center)
.Margins("5 5 5 0")
);
})
)
</body>
</html>
Thanks in advance.Regards,
Mukesh Selvaraj