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.
Hi,
I am using 1.6.1.8 Popupmenus manager.
When a popup menu is assigned to a Groupbox, it is coming up even though when I right click on a control with in the groupbox.
1. Open XPToolbarsAndContextMenus sample.
2. Set the "XPContextMenu on Popupmenusmnager1" to none for richttextbox1.
3. Select the "groupbox1" control and set the "XPContextMenu on Popupmenusmnager1" to popupmenu2 and run it.
4. Right click on the gradient label and notice that the popup menu comes up.
In my application, I have a databound grid. popup menu shows up on my grid as well. It should not do display it here.
Let me know what is happening.
thanks,
- Reddy
ASArun Srinivasan Syncfusion Team November 4, 2003 06:59 PM UTC
Hi Reddy,
Yes, that is how context/PopUp Menus will behave.
To overcome this, you could listen to the ParentBarItem's BeforePopUp and there you can look for the PopUpMenu's SourceControl and if is is say your grid, then you could cancel the PopUp.
Regards,
Arun
ADAdministrator Syncfusion Team November 4, 2003 08:34 PM UTC
Arun,
I added the BeforePopup event handler
It is printing "Control = groupBox1" when I right clicked on the gradient label. This is not right.
Can you check it out.
thanks,
- Reddy
-----------------------------------
private void parentBarItem2_BeforePopup(object sender, System.ComponentModel.CancelEventArgs e)
{
Console.WriteLine("Control = " + popupMenu2.SourceControl.Name);
}
-----------------------------------
ASArun Srinivasan Syncfusion Team November 6, 2003 09:12 PM UTC
Hi Reddy,
Sorry, the SourceControl will return the original control to which the PopupMenu was associated.
In order to prevent the Context Menu from showing up when you right click on the grid or any other Child control, you need to assign a dummy context menu.
In the XPContextMenusAndToolBars sample, you need to add another PopUpMenu and associate it with the gradientlabel. Now if you right-click the gradientlabel the context menu will not show up, wheras it will if you right click anywhere else in the groupbox.
Regards
Arun