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

RadMenuItem SelectedCssClass

1 Answer 48 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Manikandan Balasubramaniyan
Top achievements
Rank 1
Manikandan Balasubramaniyan asked on 11 Feb 2011, 09:25 PM
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);
  }

1 Answer, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 14 Feb 2011, 01:34 PM
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.
Tags
Menu
Asked by
Manikandan Balasubramaniyan
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or