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)
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?
ADAdministrator Syncfusion Team June 14, 2004 02:01 AM
Can you just show the menu yourself in this code when you catch the first right click?
LSLori S. PearsallJune 14, 2004 10:23 PM
Yes, I could. But I was trying to not be responsible for closing it too.
ADAdministrator Syncfusion Team 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?