TreeView Context menu

2 posts, 1 answers
  1. Jan
    Jan avatar
    37 posts
    Member since:
    May 2008

    Posted 23 Nov 2009 Link to this post


    I have this client side code, and I cant figure out, how can i close menu item from treeview, when I process it on client.
    <script type="text/javascript"
        function conetxtMenuClicked(sender, args) { 
            var menuItem = args.get_menuItem(); 
            var treeNode = args.get_node(); 
            //alert(treeNode.get_value() + menuItem.get_text()); 
            if (menuItem.get_value() == 'SetKeyWords') { 
                var window = radopen('/app/Pages/Admin/EditKeyWords.aspx?mpage=empty&nodeId=' + treeNode.get_value(), 'WVGA'
                window.setSize(800, 200); 

    And this header of TreeView

    <telerik:RadTreeView ID="MainTree" runat="server" EnableViewState="false" OnClientContextMenuItemClicking="conetxtMenuClicked" OnContextMenuItemClick="MainTree_ContextMenuItemClick"

    I need sometimes open radWindow and sometimes do regular postback. Problem is, when i open radWindow menu is still open.

    Any ideas? Thanks!!!
  2. Answer
    Roland avatar
    156 posts
    Member since:
    Feb 2009

    Posted 23 Nov 2009 Link to this post

    instead of menuitem.close()

    menuItem.get_menu().hide()   // this will close the whole menu, not menuitem only.
  3. DevCraft R3 2016 release webinar banner
Back to Top