[CLOSED] How to set the selected Menu Item at <ext:Menu>

  1. #1

    [CLOSED] How to set the selected Menu Item at <ext:Menu>

    Hi all,

    i have follwing Menu @ my master page , i did search over all exmaples and i don't see any property to set the selected Item @ my menu Item , below is my code your quick response really appreciated:

      <ext:Toolbar runat="server" Width="1119">
                        <Items>
                         <ext:Menu ID="Menu1" runat="server" Width="1119" 
                            Hidden="false" 
                            ShowSeparator="false"
                            EnableScrolling="false"
                            Cls="x-menu-horizontal"
                            Floating="false">
                        <Items>
                        <ext:MenuItem  ID="DashBoard" runat="server" Text="DashBoard"  BoxMinWidth="100"  Href="/Dashboard.aspx" AutoFocus="true"></ext:MenuItem>
                        <ext:MenuItem ID="SocialCRM" runat="server" Text="Social CRM"  BoxMinWidth="100" Href="/SocialCRM.aspx" AutoFocus="true"></ext:MenuItem>
                        <ext:MenuItem ID="showroom" runat="server" Text="Show Room"  BoxMinWidth="100" Href="/ShowRoom.aspx" AutoFocus="true"></ext:MenuItem>
                        <ext:MenuItem ID="engage" runat="server" Text="Engage"  BoxMinWidth="100"  Href="/Engage.aspx" AutoFocus="true"></ext:MenuItem>
                        <ext:MenuItem ID="reputationmanager" runat="server" Text="Reputation Manager"  BoxMinWidth="100" Href="/ReputationManager.aspx" AutoFocus="true"></ext:MenuItem>
                        <ext:MenuItem ID="contentlibrary" runat="server" Text="Content Library"  BoxMinWidth="100" Href="/ContentLibrary.aspx" AutoFocus="true"></ext:MenuItem>
                        </Items>
                        <Listeners>
                         <ItemClick Fn="menuItemClick" />
                        </Listeners>
                        </ext:Menu>
                        </Items>
                        </ext:Toolbar>
    Last edited by Daniil; Feb 08, 2011 at 2:06 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Menu doesn't support preselecting and doesn't save selection after mouse out or click from/on menu item
  3. #3

    is there any subtitue for this

    I need a substitute for this, to have a horizintal menu.
  4. #4
    Hi,

    Try MenuPanel
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Ext.NET Example</title>
        <style type="text/css">
            .x-menu.x-menu-horizontal .x-menu-list
            {
                overflow: hidden;
            }
            .x-menu.x-menu-horizontal .x-menu-list .x-menu-list-item
            {
                float: left;
            }
            .x-menu.x-menu-horizontal .x-menu-list .x-menu-list-item .x-menu-item-arrow
            {
                background: none;
            }
        </style>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        <ext:Viewport runat="server" Layout="Border">
            <Items>
                <ext:MenuPanel ID="MenuPanel1" runat="server" Border="false" Region="North" Height="28"
                    SaveSelection="true" SelectedIndex="0">
                    <Menu ID="Menu1" runat="server" Hidden="false" ShowSeparator="false" EnableScrolling="false"
                        SubMenuAlign="tl-bl?" Cls="x-menu-horizontal" Floating="false">
                        <Items>
                            <ext:MenuItem ID="DashBoard" runat="server" Text="DashBoard" BoxMinWidth="100" Href="/Dashboard.aspx"
                                AutoFocus="true">
                            </ext:MenuItem>
                            <ext:MenuItem ID="SocialCRM" runat="server" Text="Social CRM" BoxMinWidth="100" Href="/SocialCRM.aspx"
                                AutoFocus="true">
                            </ext:MenuItem>
                            <ext:MenuItem ID="showroom" runat="server" Text="Show Room" BoxMinWidth="100" Href="/ShowRoom.aspx"
                                AutoFocus="true">
                            </ext:MenuItem>
                            <ext:MenuItem ID="engage" runat="server" Text="Engage" BoxMinWidth="100" Href="/Engage.aspx"
                                AutoFocus="true">
                            </ext:MenuItem>
                            <ext:MenuItem ID="reputationmanager" runat="server" Text="Reputation Manager" BoxMinWidth="100"
                                Href="/ReputationManager.aspx" AutoFocus="true">
                            </ext:MenuItem>
                            <ext:MenuItem ID="contentlibrary" runat="server" Text="Content Library" BoxMinWidth="100"
                                Href="/ContentLibrary.aspx" AutoFocus="true">
                            </ext:MenuItem>
                        </Items>
                    </Menu>
                </ext:MenuPanel>
                <ext:Panel runat="server" Region="Center" />
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>

Similar Threads

  1. Replies: 8
    Last Post: Jul 29, 2012, 10:58 AM
  2. Replies: 2
    Last Post: Apr 02, 2012, 7:48 AM
  3. [CLOSED] Always selected Item is nothing for combobox as menu item
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 04, 2011, 4:51 PM
  4. [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
  5. Replies: 1
    Last Post: Jan 20, 2010, 6:08 AM

Tags for this Thread

Posting Permissions