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

MouseDown events

Thread ID:

Created:

Updated:

Platform:

Replies:

15172 Jun 13,2004 07:55 PM Jun 15,2004 03:40 AM Windows Forms 3
loading
Tags: GridControl
Lori S. Pearsall
Asked On June 13, 2004 07:55 PM

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 02:01 AM

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

Lori S. Pearsall
Replied On June 14, 2004 10:23 PM

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

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

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?

CONFIRMATION

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.

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.

;