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

How to disable node select on mouse right click

Thread ID:





143629 Mar 29,2019 11:23 AM UTC Apr 1,2019 10:37 AM UTC React - EJ 2 1
Tags: Treeview
Sonam Diwate
Asked On March 29, 2019 11:23 AM UTC

I want to disable node click event  for mouse right click.

node click and select node should only work for mouse left click and not on mouse right click.

Sonam Diwate

Christopher Issac Sunder K [Syncfusion]
Replied On April 1, 2019 10:37 AM UTC

Hi Sonam Diwate, 

Greetings from Syncfusion!!! 

You can check whether you right click the node by using following code snippet in the nodeSelecting event of treeview and cancel the event if it is right click. 

if (event.which === 3 && event.button === 2) { 
    args.cancel = true; 
} else { 
    alert("Node Selected"); 

Please check the above sample and get back to us if you 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