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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable right click event on treeview

Thread ID:





143759 Apr 4,2019 05:54 AM UTC Apr 5,2019 10:16 AM UTC React - EJ 2 1
Tags: Treeview
Sonam Diwate
Asked On April 4, 2019 05:54 AM UTC

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.

Christopher Issac Sunder K [Syncfusion]
Replied On 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. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon