Hiding and Showing menu item

5 posts, 0 answers
  1. Ric
    Ric avatar
    4 posts
    Member since:
    Apr 2008

    Posted 28 Apr 2008 Link to this post

    The code below is not working for some reason. The intent is if a user clicks the main menu check the value in the cb dropdown and hide/show a menu item. But the menu item is not hiding and displaying like I expect. Any ideas?

    ///////////////////////////////////////////////////

    <

    telerik:RadMenu ID="menuSettings" runat="server" OnClientItemClicking

    =MenuItemClicking>

    ////////////////////////////////////////////////

    function MenuItemClicking()

    {

    debugger;

    var cb= $find("<%=cb.ClientID%>");

    if (cb._selectedIndex==0)

    ItemVisibility(

    "ShowHideEmptyBeds",false);

    else

     ItemVisibility("ShowHideEmptyBeds",true);

    }

    function

    ItemVisibility(menuText,visibility)

    {

    var menu = $find("<%= menuSettings.ClientID %>");

    var menuItem = menu.findItemByText(menuText);

    if(menuItem && (menuItem.get_visible()!=visibility))

    {

    menuItem.set_visible(visibility);

    }

    }

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Apr 2008 Link to this post

    Hi Ric,

    Go through the KB article "Hiding RadMenu or RadMenu items on the client" for getting more information about how to hide/show the menu item from client side.

    Shinu.
  3. Ric
    Ric avatar
    4 posts
    Member since:
    Apr 2008

    Posted 29 Apr 2008 Link to this post

    Unfortunately that does not work for me.The menuitem is made up of Itemtemplate with a group of radio buttons. What happens is that the radiobuttons still appear when I call the hide() function.
  4. Ric
    Ric avatar
    4 posts
    Member since:
    Apr 2008

    Posted 29 Apr 2008 Link to this post

    Unfortunately that does not work for me.The menuitem is made up of Itemtemplate with a group of radio buttons. What happens is that the radiobuttons still appear when I call the hide() function.
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2834 posts

    Posted 29 Apr 2008 Link to this post

    Hello Ric,

    Thank you for reporting this issue. We have managed to reproduce the problem and fix it. Please, open a formal support ticket, so we can send you a hotfix. Your Telerik points have been updated for your involvement.

    Best wishes,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top