The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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!
ADAdministrator Syncfusion Team June 14, 2004 06:01 AM UTC
Can you just show the menu yourself in this code when you catch the first right click?
LSLori S. PearsallJune 15, 2004 02:23 AM UTC
Yes, I could. But I was trying to not be responsible for closing it too.
ADAdministrator Syncfusion Team 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?