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

Custom CCS menu

4 Answers 96 Views
Menu
This is a migrated thread and some comments may be shown as answers.
pbarron
Top achievements
Rank 1
pbarron asked on 09 Apr 2008, 05:17 PM
I have a Prometheus Menu control with a custom skin using a an xml data source which works well.  My next step is to change the css so that each menu option is a different color.  Does any one know how to set about donig this, to I add attibutes to teh nodes in teh XML if so what would the be.

Thanks
Paul



4 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 10 Apr 2008, 02:34 PM
Hi pbarron,

When using XmlDataSource you could hook to the OnItemDataBound server event of the RadMenu. In the event handler you could set for each item some or all of the properties: CssClass, FocusedCssClass, ClickedCssClass and so on.

I hope this is useful.

Best wishes,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
pbarron
Top achievements
Rank 1
answered on 10 Apr 2008, 03:20 PM
Dont supose you have any examples or something similar

Thanks
Paul
0
pbarron
Top achievements
Rank 1
answered on 14 Apr 2008, 11:33 AM
When I add 'OnItemDataBound' I get the following error

'NoOverload for 'RadMenu1_ItemDataBound' matches delegate.Web.UI.RadMenuiEventHandler'


<telerik:RadMenu ID="RadMenu" runat="server" EnableEmbeddedSkins="False" onitemclick="RadMenu_ItemClick" OnItemDataBound="RadMenu1_ItemDataBound">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                    </telerik:RadMenu>


Any ideas why this does not work

Thanks
Paul
0
Simon
Telerik team
answered on 14 Apr 2008, 12:39 PM
Hello pbarron,

Most probably the event arguments specified in your code and those expected by the RadMenu mismatch. The first should be of type Telerik.Web.UI.RadMenuEventArgs.

In any case I have attached a demo project which illustrates the approach.

I hope it helps.

Greetings,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Menu
Asked by
pbarron
Top achievements
Rank 1
Answers by
Simon
Telerik team
pbarron
Top achievements
Rank 1
Share this question
or