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

MouseDown events

Thread ID:





15172 Jun 13,2004 11:55 PM UTC Jun 15,2004 07:40 AM UTC WinForms 3
Tags: GridControl
Lori S. Pearsall
Asked On June 13, 2004 11:55 PM UTC

Here''s what I''m trying to do ... I want my XPMenus PopupMenu to display whenever a user right-clicks on the grid. The catch is when a cell has been activated for editing - the MouseDown is going to the cell renderer. I read the KnowledgeBase article : Q10465 - Info: How to capture Mouse and Key events when the textbox cell is in active edit state? That allowed me to trap the mouse click and do the following : if (this.AffectEditToolBar && e.Button == MouseButtons.Right && this.CurrentCell.IsEditing) { this.CurrentCell.EndEdit(); OnMouseDown(e); return; } I have just one more thing to figure out - I still have to right-click a second time to get the grid to register the right-click. Is there any way in the code above to get the grid to respond to the first right-click? Thanks!

Administrator [Syncfusion]
Replied On June 14, 2004 06:01 AM UTC

Can you just show the menu yourself in this code when you catch the first right click?

Lori S. Pearsall
Replied On June 15, 2004 02:23 AM UTC

Yes, I could. But I was trying to not be responsible for closing it too.

Administrator [Syncfusion]
Replied On June 15, 2004 07:40 AM UTC

I may be wrong, but I think the context menu will close itself when you click a menu item or move off the menu no matter how it is opened. Did you try calling contextmenu.Show where you wanted to somehow trigger another mousedown to see how it works?


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