Disabled Menu Item that looks normal?

3 posts, 0 answers
  1. Chris Mitchell
    Chris Mitchell avatar
    15 posts
    Member since:
    Oct 2009

    Posted 09 Sep 2010 Link to this post

    I have a RadMenu that uses sub-items in a variety of places. What I would like to do is have the items that have children not be clickable themselves (since they exist only for categorization purposes). I tried just making that item .Enabled = false but that caused it to shift in appearance which I do NOT want.. I couldn't seem to get the DisabledCSSStyle property to work with this..

    Is there an easy way to do this? If it matters, I am building my menus dynamically..
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Sep 2010 Link to this post


    Add the "!important" keyword in the style in order to override the default style of RadMenu.

    <style type="text/css">
            color:Black !important;

    <telerik:RadMenuItem runat="server" Text="City">
          <telerik:RadMenuItem Enabled="false" DisabledCssClass="disabledItem" runat="server" Text="Ohio">

  3. Veronica
    Veronica avatar
    1213 posts

    Posted 10 Sep 2010 Link to this post

    Hi Chris Mitchell,

    You can subscribe to the OnClientItemClicking event and check if the current clicked item has children. If yes - the event will be cancelled. Here's a sample code:

    function clientItemClickingHandler(sender, args) {
                var item = args.get_item();
                if (item.get_items().get_count() != 0) {
                else {
                    alert("item is clicked");

    Hope this helps.

    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top