Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
WebDataTree Node Right Click
posted

Hi,

I am using WebDataTree in my page and using a Context menu (custom) on another page to show when right click on Tree node.

When I right click on node, I am getting the custom menu, but default context also showing. See the HTML Tag and JS code below. 

What should be using to prevent to showing default context menu ? 


<ig:WebDataTree ID="TreeControl" runat="server" InitialExpandDepth="1" SingleBranchExpandLevel="0" 
                                                    SelectionType="Single" Visible="true" Height="100%" ForeColor="Black" EnableConnectorLines="true">

  
            <ClientEvents  
    			NodeClick="nodeCick"/>

function nodeClick(tree, args) {


  var button = 1;

    if (args.get_browserEvent() != null) {
        button=parseInt(args.get_browserEvent().button);
    }

    if (button == 2) {
        parent.showContextMenu(args);
        args.set_cancel = true;
    }


}

Thanks & Regards,

Karthik Thangavel.

Parents
No Data
Reply
  • 4315
    Offline posted

    Hi, Karthik. 

    I've just answered the same question in this thread. Don't hesitate to ask if you have more questions.

    Best regards,

    Nikolay Alipiev

    Software Developer

Children
No Data