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

Hide the icon column for RadMenu items

4 Answers 283 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 07 Jul 2011, 11:18 AM
I want to be able to hide or show the icon column for the RadMenu, but want to be able to turn this column on and off for individual menu items but can't see how to do this.

I found a page that says this is available for the RadMenu for silverlight here http://www.telerik.com/help/silverlight/radmenu-how-to-remove-the-icon-area-for-radmenu.html but even this suggests its either on or off for all items in a menu and cant be set for each one.

Can anyone tell me if this can be done, and if it can, how?

Thanks.

4 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 12 Jul 2011, 03:35 PM
Hello Karl,

To be able to achieve this effect with the ASP.NET AJAX RadMenu control you will need to use a css class selector and apply it to the child items of the RadMenu control using the CssClass property. However, since the CssClass property that could be used is applied to the <a> element of the RadMenu and the padding/margin that you need to remove is put to a <span> element that is in the <a> element,  you can not use the above mentioned property for this purpose. One way to remove the space is to apply the following css class selector:
div.RadMenu .rmGroup .rmText {
    margin: 0 0 0 -21px;
    padding: 0 54px 0 28px;
}

Unfortunately it will not take effect to the individual items but to the whole group of child items.
 

Best wishes,
Kate
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Mattias
Top achievements
Rank 1
answered on 24 Apr 2012, 12:28 PM
Old post but!
You need to remove background as well:
.RadMenu .rmGroup {
    background-image:none !important;
}
 
.RadMenu .rmGroup .rmLink .rmText { 
    text-align: left !Important;  
    padding-left:5px !Important;
    margin-left:2px !Important;  
}

/Mattias
0
Alain
Top achievements
Rank 2
answered on 27 Oct 2012, 06:41 PM
Hello,

Why not use the built in feature :

Since Q2 2010 RadMenu has a property for defining the width of the column, which is reserved for the Icons. The property is called IconColumnWidth. And when set to 0 the space for the Icon disappears.
0
Raymond
Top achievements
Rank 1
answered on 02 Nov 2012, 10:01 AM
IconColumnWidth applies to Silverlight and not Ajax
Tags
Menu
Asked by
Karl
Top achievements
Rank 1
Answers by
Kate
Telerik team
Mattias
Top achievements
Rank 1
Alain
Top achievements
Rank 2
Raymond
Top achievements
Rank 1
Share this question
or