RadMenuItem SelectedCssClass

2 posts, 1 answers
  1. Manikandan Balasubramaniyan
    Manikandan Balasubramaniyan avatar
    17 posts
    Member since:
    Feb 2010

    Posted 11 Feb 2011 Link to this post

    I am trying to highlight the menu item upon clicking and make it highlighted till the next menu item is clicked.
    But this doesnot seem to be working.

    As per the following link:
    http://www.telerik.com/help/aspnet-ajax/menu_appearancecssclassofitems.html

    i did this:
    <telerik:RadMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick"><br>  
     </
    telerik:RadMenu>

    protected void Page_Load(object sender, EventArgs e)  
     {         
     if (!IsPostBack)           
       {                
         displayLinks();
        }                
       }
     private void displayLinks()<br
     {
        RadMenuItem menuItem = new RadMenuItem();
         menuItem.SelectedCssClass = "rmSelected";
         menuItem.Text = "Test";
         menuItem.NavigateUrl =  "www.google.com";
         RadMenu1.Items.Add(menuItem);
      }
  2. Answer
    Kate
    Admin
    Kate avatar
    1898 posts

    Posted 14 Feb 2011 Link to this post

    Hello Manikandan,

    The tutorial that you have tried to follow is concentrated mainly on the look of the menu (how to change the color of an item when it is selected). To achieve this you would probably like to take a look at these tutorials as well: Tutorial: Creating A Custom Skin, Understanding the Skin CSS File and  CSS Skin File Selectors.

    However, if you need to have the path highlightened and selected I would suggest that you apply the HighlightPath() function on the server-side as shown in the demo here.

    Kind regards,
    Kate
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top