Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
Get clicked Item by clicking the Contextmenu?
posted

Hey,

I added an IGMenuItem to the ContextMenu in my ultraExplorerBar:

 

Infragistics.Win.IGControls.IGMenuItem item = new Infragistics.Win.IGControls.IGMenuItem("Edit Item", ReportItemEdit_Click);
e.ContextMenu.MenuItems.Add(item);           

private void ReportItemEdit_Click(object sender, EventArgs e)
{
            Infragistics.Win.IGControls.IGMenuItem contextItem = (Infragistics.Win.IGControls.IGMenuItem)sender;
}

 

My question is how I can get now the UltraExplorerBarItem where I've clicked the contextMenuItem? At the moment I only the the IGMenuItem.

 

Thanks in advance

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    Typically one creates the menu item in response to the MouseDown event; you can use the ItemFromPoint method therein to get a reference to the UltraExplorerBarItem. When you create the IGMenuItem, you can assign that UltraExplorerBarItem reference to the IGMenuItem's Tag property, then when the IGMenuItem is clicked, you can reference the UltraExplorerBarItem.

Children
No Data