Radmenu selectedItem backcolor

6 posts, 0 answers
  1. ShahabG
    ShahabG avatar
    16 posts
    Member since:
    Aug 2003

    Posted 18 Oct 2011 Link to this post

    Hi
    How doI set the backcolor of selectedItem in radmenu to a different color in Server side or client side.
    Thanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Oct 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ShahabG
    ShahabG avatar
    16 posts
    Member since:
    Aug 2003

    Posted 20 Oct 2011 Link to this post

    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
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 20 Oct 2011 Link to this post

    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
  6. ShahabG
    ShahabG avatar
    16 posts
    Member since:
    Aug 2003

    Posted 20 Oct 2011 Link to this post

    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
  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 24 Oct 2011 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017