Ensuring the Order of the Top-Level Menu Item

2 posts, 0 answers
  1. kencox
    kencox avatar
    106 posts
    Member since:
    Oct 2002

    Posted 31 Aug 2010 Link to this post

    Hi guys,

    I have a row of information across the top of the page that includes some debug text, login name, the top menu item, and the login status. I want to keep everything in that order from left to right. However, the RadMenu always places itself on the end at the right.

    The menu was showing up on the extreme left (much worse!) before I found this trick:

            div.RadMenu_Web20
            {
                float: right;
            }

    How do I get the menu to stay in the correct order? The relevant markup is included below.

    Thanks,

    Ken

    <div class="utilitylinks">
        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
        <asp:Label EnableViewState="true" ID="lblLoginName" runat="server"></asp:Label>
        <telerik:RadMenu ID="mnuSettings" runat="server" CssClass="utilitylinks" EnableEmbeddedSkins="false">
            <Items>
                <telerik:RadMenuItem runat="server" PostBack="False" ForeColor="White" Text="Settings">
                    <Items>
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/setmyrole.aspx" PostBack="False"
                            SelectedCssClass="uppermenuitemsfocussed" FocusedCssClass="uppermenuitemsfocussed"
                            CssClass="uppermenuitems" Text="Debug: Set My Role" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/datadownload.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Data Download" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/delegateaccess.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Delegate Access" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/managedelegations.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Manage Delegations" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/redeemtoken.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Redeem Token" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/bizactivities.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Business Profile Settings" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/setbusactivity.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Set Business Activity" />
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/accounttypes.aspx" PostBack="False"
                            CssClass="uppermenuitems" Text="Accounts" />
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
        <asp:LoginStatus EnableViewState="true" CssClass="utilitylinks" ID="LoginStatus2"
            runat="server" LogoutAction="Redirect" LogoutPageUrl="logout.aspx" />
    </div>
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 06 Sep 2010 Link to this post

    Hi Ken Cox,

    As I understand you do not use the embedded skins of the RadMenu control.
    Let me suggest you nest the "Literal1" and "lblLoginName" in a "div" tag floated to the left and override the .RadMenu css style in this manner:

    <head runat="server">
        <title></title>
        <style type="text/css">
            div.RadMenu
            {
                float: left;
                white-space: nowrap;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <div>
            <div class="utilitylinks">
            <div style="float: left;">
                <asp:Literal ID="Literal1" runat="server"
                    Text="some debug text"></asp:Literal>
                <asp:Label EnableViewState="true" ID="lblLoginName"
                    Text="some username" runat="server"></asp:Label>
            </div>
                <%--ForeColor="White" --%>
            <telerik:RadMenu ID="mnuSettings" runat="server"
                CssClass="utilitylinks" EnableEmbeddedSkins="false">
                <Items>              
                <telerik:RadMenuItem runat="server"
                PostBack="False" Text="Settings">
                <Items>
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/setmyrole.aspx" PostBack="False"
                        SelectedCssClass="uppermenuitemsfocussed"
                        FocusedCssClass="uppermenuitemsfocussed"
                        CssClass="uppermenuitems"
                        Text="Debug: Set My Role" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/datadownload.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Data Download" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/delegateaccess.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Delegate Access" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/managedelegations.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Manage Delegations" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/redeemtoken.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Redeem Token" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/bizactivities.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Business Profile Settings" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/setbusactivity.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Set Business Activity" />
                    <telerik:RadMenuItem runat="server"
                        NavigateUrl="~/accounttypes.aspx"
                        PostBack="False"
                        CssClass="uppermenuitems"
                        Text="Accounts" />
                </Items>
                </telerik:RadMenuItem>
            </Items>
            </telerik:RadMenu>
            <asp:LoginStatus EnableViewState="true"
                CssClass="utilitylinks" ID="LoginStatus2"
                runat="server" LogoutAction="Redirect"
                LogoutPageUrl="logout.aspx" />
            </div>
        </div>
        </form>
    </body>

    If the issue persists - please paste here the code of "utilitylinks" css style and explain in more details your implementation. Thank you in advance.

    All the best,
    Kalina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top