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

Top menu items - sub link indicator

2 Answers 84 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Samantha
Top achievements
Rank 1
Samantha asked on 21 Jan 2009, 03:15 PM
I'm using a vertical menu, with the Gray skin.  Some of my top-level menu items have sub-menu items and some do not.  Is it possible to have the little arrows that show up in the sub-menu items to indicate further menus appear in the top-level navigation?

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Jan 2009, 09:53 AM
Hello Samantha,

You can set the css class for the RadMenuItem in the PreRender event of the menu and apply the required style in the css class as shown below:
cs:
protected void RadMenu1_PreRender(object sender, EventArgs e) 
    { 
        foreach (RadMenuItem rootItem in RadMenu1.Items) 
            if (rootItem.Items.Count > 0) 
            { 
                rootItem.CssClass = "test"
            } 
    } 

css:
.test 
  {  
     background: url('image') right center no-repeat !important; 
  }   

Princy.
0
Michael
Top achievements
Rank 1
answered on 22 Jan 2009, 01:08 PM
I'm building my menu Items dynamically in the code behide of a control.  Does the setting of the css properties of an item need to be in the preRender event? 

I've tried setting them with my code behind function  as the items are being built but they don't seem to be taking effect. 
Tags
Menu
Asked by
Samantha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Michael
Top achievements
Rank 1
Share this question
or