This is a migrated thread and some comments may be shown as answers.

Ensuring the Order of the Top-Level Menu Item

1 Answer 36 Views
Menu
This is a migrated thread and some comments may be shown as answers.
kencox
Top achievements
Rank 1
kencox asked on 01 Sep 2010, 04:43 AM
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>

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 06 Sep 2010, 12:56 PM
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
Tags
Menu
Asked by
kencox
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or