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

How to wrap menu item text

3 Answers 154 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 23 Jul 2008, 02:20 PM
Hi
      I have bind menu using dataset from database, I want to wrap menu item text.
How it's possible.

Thanks
Swapnil

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 24 Jul 2008, 09:52 AM
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.
0
Yana
Telerik team
answered on 24 Jul 2008, 01:45 PM
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
0
Margie
Top achievements
Rank 1
answered on 30 Jan 2014, 12:56 AM
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.
Tags
Menu
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Yana
Telerik team
Margie
Top achievements
Rank 1
Share this question
or