How to wrap menu item text

4 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 23 Jul 2008 Link to this post

    Hi
          I have bind menu using dataset from database, I want to wrap menu item text.
    How it's possible.

    Thanks
    Swapnil
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Jul 2008 Link to this post

    Hi Rahul,

    You can use a small CSS class with the white-space:normal attribute to change the item so that it wraps.

    ASPX:
     
     <telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal"
     <Items> 
       <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Root Item 1"
         
         <Items> 
     
           <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" 
              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>  
     
     

     <head runat="server"
       <title>Untitled Page</title> 
       <style> 
        .WrappingItem 
        { 
          white-space: normal; 
        } 
       </style> 
    </head>  


    Cheers
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 24 Jul 2008 Link to this post

    Hi Rahul,

    Please check out this help topic for wrapping RadMenu items text.

    Hope this helps.

    Regards,
    Yana
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Margie
    Margie avatar
    5 posts
    Member since:
    Jan 2014

    Posted 29 Jan 2014 in reply to Yana Link to this post

    Hi Rahul,

    I would like to confirm, is it possible to have this implementation using the available RadMenu properties and events?

    I have a collection of Parent and Sub Menus. What I want is that if the user resize the page to make it smaller, instead of wrapping the items, I will move the parent menu that is wrapping to make it a sub menu. On the other hand, if the page grows bigger, I wanted to move the sub menu item to become parent menu.

    I mean, is there an even I can use the catch the wrapping process?

    Thanks Rahul.
Back to Top