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

Radmenu selectedItem backcolor

5 Answers 207 Views
Menu
This is a migrated thread and some comments may be shown as answers.
ShahabG
Top achievements
Rank 1
ShahabG asked on 18 Oct 2011, 11:26 PM
Hi
How doI set the backcolor of selectedItem in radmenu to a different color in Server side or client side.
Thanks

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Oct 2011, 05:30 AM
Hello ShahabG,

You can set EnableSelection property as true and use "rmSelected" css class  to style it.

CSS:
<style type="text/css">
.rmSelected
{
  background-color: Yellow !important;
}
</style>

Thanks,
Princy.
0
ShahabG
Top achievements
Rank 1
answered on 20 Oct 2011, 01:14 PM
Hi Princy
Thanks for the code, but it doesn't work. I have the menu in the master page
for example if we have to menu items:
Help About
When user select Help I want Help get back color of yellow, which show which page is user on.
Thanks
0
Kate
Telerik team
answered on 20 Oct 2011, 01:26 PM
Hello Shahabg,

In case you use any of our predefined skin, changing the background color of a RadMenu item when it is selected will require you to use a different sprite image. Please take a look at this help article at it explains in details how this can be achieved.

Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
ShahabG
Top achievements
Rank 1
answered on 20 Oct 2011, 06:12 PM
Hi
Thanks for the answer, but I don't want to change the skin, on the demo page for menu first look
http://demos.telerik.com/aspnet-ajax/menu/examples/default/defaultvb.aspx

if you select Sunset Skin, when you press the menu item the back color changes to yellow, which show which item is selected.
I need the same effect, but I have the menu in master page and each menu item is has URL to a  page.
Thanks
0
Kate
Telerik team
answered on 24 Oct 2011, 02:30 PM
Hello Shahabg,

I understand that you need to change the yellow background color that is applied to the RadMenuItem when it is hovered. However, this color is not set using background-color:yellow but it is rather a sprite image that is applied to the item when it is hovered. Thus it is not only a single property that you need to overwrite but a whole sprite image that you need to alter and apply instead of the original one. Therefore I recommended the above article that explains how you can alter that color. Another approach would be to use our Visual Style Builder and implement your own custom skin. 

Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Menu
Asked by
ShahabG
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
ShahabG
Top achievements
Rank 1
Kate
Telerik team
Share this question
or