We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Disable right click event on treeview

How to disable right click event on TreeView, as node get selected on mouse right click as well.
I have intergrated contextMenu on treeview but when I right click node get selected.

Please share some POC to disable right click event on treeview or how to disable nodeselecting on right click.

1 Reply

CI Christopher Issac Sunder K Syncfusion Team April 5, 2019 10:16 AM UTC

Hi Sonam, 

Greetings from Syncfusion!!! 

We have prepared a sample by integrating context menu in treeview. In this sample, we have disabled the node selection on right mouse click in the nodeSelecting event of treeview using following code block.  

//To remove ripple effect 
//handle nodeSelecting event 
nodeSelection(args) { 
    if (event.which === 3 && event.button === 2) { 
        args.cancel = true; 

Please check the above sample and let us know if you have any concerns or need any further assistance. 


Live Chat Icon For mobile
Up arrow icon