Custom CCS menu

5 posts, 0 answers
  1. pbarron
    pbarron avatar
    29 posts
    Member since:
    Apr 2007

    Posted 09 Apr 2008 Link to this post

    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



  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 10 Apr 2008 Link to this post

    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
  3. pbarron
    pbarron avatar
    29 posts
    Member since:
    Apr 2007

    Posted 10 Apr 2008 Link to this post

    Dont supose you have any examples or something similar

    Thanks
    Paul
  4. pbarron
    pbarron avatar
    29 posts
    Member since:
    Apr 2007

    Posted 14 Apr 2008 Link to this post

    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
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 14 Apr 2008 Link to this post

    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
Back to Top