I display a context menu (using MouseUp) when the user right clicks a node.
But before the menu displays, the node expands or collapses.I ONLY want the menu to display. How to I stop the automatic Toggle expansion?
(At first I thought I was doing something in my app but I created a simple app with no code except the creation/loading of the Tree and that does the same thing.)
Hello,
I tried to reproduce the issue using Volume 13.2 and everything is working correctly. I put a new menu and the menu pops up when you press the right click and no nodes are expanded. Can you please confirm that you have bound the menu to the right mouse click event? What version of our products do you use?
Please take a look at my sample and modify it so that it reproduces your issue.
I'll take a look at your sample.
In answer to your questions I am using NetAdvantage 13.1 and am using the MouseUp event to display the menu.
Note that in my demo I simply place a Tree on the form and load some data. I do not display a menu, or handle any events.When I right click a node it Expands or Contracts.
Hello Mike,
I am glad you were able to trace your issue. Please let me know if you require additional assistance.
Thank you for using Infragistics Components.
I couldn't use your demo since you used VS2012 and C# while I use VS2010 and VB.
However when I added a MouseUp handler to my demo app, and display the menu on a right click the node no longer expands or contracts.
I finally traced the problem to the fact that I handle MouseDoubleClick to Expand/Collapse a node.
I had ignored that since that event should not fire on a right click.Unfortunately my mouse is dying ... and it 'sticks' often issuing a double click when I only click once! (It makes using context menus almost impossible at times)
Sorry for the confusion.
Hi Mike,
Are you saying you are getting this behavior in Mitko's sample, too?
That's the not intended behavior of the tree and it's not the behavior I am getting. Single-clicking on a node with either mouse button has no effect on the expanded state of the node.
The only explanation I can come up with it that there is something in your application causing this (which you seem to be ruling out) or something is very unusual about the mouse behavior on your machine such that a single right-click results in a double-click message being send to the node.