how to wrap text only for level 1 menu item?

2 posts, 0 answers
  1. AUK
    AUK avatar
    47 posts
    Member since:
    Oct 2004

    Posted 27 Nov 2013 Link to this post

    how to wrap text only for level 1 menu item? as I don't want to wrap text for the menu sub item, is this possible?

    Many thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Nov 2013 Link to this post

    Hi AUK,

    Please have a look into the following code snippet to achieve your scenario.

    ASPX:
    <telerik:RadMenu ID="RadMenu1" runat="server">
        <Items>
            <telerik:RadMenuItem runat="server" Text="Root Item 1">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="This is an extremely long item text that is used to illustrate the use of the CssFile property"
                        CssClass="WrappingItem">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>

    CSS:
    <style type="text/css">
        .WrappingItem
        {
            white-space: normal !important;
            background-image: none !important;
        }
        .RadMenu_Default .rmGroup .rmText, .RadMenu_Default .rmVertical .rmText
        {
            background-image: none !important;
        }
    </style>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top