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

Popupmenu item click event issue

Hi,
VS2003, V4.4.0.51.

I want to use popup menu to add a new node on TreeView control and set the node label to edit mode. But it does not work well. If I use same code by clicking a button, it works. Please see my attached sample. Any ideas?
Thanks in advance.

Lan

WindowsApplication250.zip

3 Replies

GS Gopalakrishnan S Syncfusion Team February 6, 2007 11:42 PM UTC

Hi Lan,

Thanks for using Syncfusion products.

You can use the MouseUp event of TreeView for shows the PopupMenu instead of MouseDown event.

Here is the code snippet:

private void treeView1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button==MouseButtons.Right)
{
popupMenu1.Show(treeView1,new Point(e.X,e.Y));
}

}

Please let me know if this works.

Thanks,
S.Gopal.


AD Administrator Syncfusion Team February 7, 2007 09:11 PM UTC

Hi Gopal,
Thanks for help. It works well for me.

Lan


GS Gopalakrishnan S Syncfusion Team February 7, 2007 09:16 PM UTC

Hi Lan,

Thanks for your update.

Regards,
S.Gopal.

Loader.
Live Chat Icon For mobile
Up arrow icon