[RAZOR] Menu Panel , Menu , Menu item not working in ext.net 2.0

  1. #1

    [RAZOR] Menu Panel , Menu , Menu item not working in ext.net 2.0

    Hi,

    I am not able to create MenuPanel. Please find below mentioned code. Find the attachment.

    @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("MenuPanel")
        .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("MenuPanel with Selection Saving")
                        .Icon(Ext.Net.Icon.ArrowSwitch)
                        .Items(menupaneliconitems =>
                            {
                                menupaneliconitems.Add(
                                    Html.X().Menu()
                                    .Items(menuitemsmenui =>
                                        {
                                            menuitemsmenui.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>
    Kindly do the needful.
    Thanks in advance

    Regards,
    Mukesh Selvaraj
    Attached Thumbnails Click image for larger version. 

Name:	Menupanelissue.JPG 
Views:	441 
Size:	68.2 KB 
ID:	4047  
  2. #2
    Please use this code
    @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("MenuPanel")
        .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("MenuPanel 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>
  3. #3

    [Working]

    Hi,

    Thanks it is working fine.

    Regards,
    Mukesh Selvaraj

Similar Threads

  1. Replies: 8
    Last Post: Jul 29, 2012, 10:58 AM
  2. Replies: 2
    Last Post: May 28, 2012, 1:54 PM
  3. Replies: 2
    Last Post: Feb 22, 2012, 4:16 PM
  4. [CLOSED] How to set the selected Menu Item at <ext:Menu>
    By farisqadadeh in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 06, 2011, 11:59 AM
  5. [CLOSED] Menu inside Component menu item
    By tansu in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 15, 2010, 2:32 PM

Posting Permissions