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
125
SetContextMenuUltra Method - Broken?
posted

 

We are using 2009.1, and just recently had to install the latest version of that library, which included hot fixes we had not previously applied.

Now, the SetContextMenuUltra method, of the UltraToolbarsManager class, is not working as before, and our existing code is completely broken, and inducing many app crashes.

Here is a sample of how this is being used... we simply set the context menu for a control (the grid, for example), and then show it.  Can someone explain why this is now not working?  *Nothing* in this code has changed.

 

 

this

 

.ultraToolbarsManagerContext.SetContextMenuUltra(grid, "PopupMenuTool");

 

grid.ContextMenu.Show(grid, grid.PointToScreen(e.Location));

 

 

 

Calling the SetContextMenuUltra method just doesn't work; the ContextMenu property of the control (the grid, in the example above) remains null.

Thanks.

 

 

  • 14517
    Offline posted

    The fact that setting the ContextMenuUltra through the UltraToolbarsManager also set the ContextMenu on the control was an internal implementation detail. To programmatically show the context menu you should really be going through the UltraToolbarsManager and use the ShowPopup method or alternately you can use the Show method associated with the ContextMenuStrip on the control, but the first method is preferred.

    For example:

                    UltraToolbarsManagerContext.ShowPopup(“PopupMenuTool”)

                    Or

                    Grid.ContextMenuStrip.Show(grid,e.Location)

    Sincerely,

    Valerie

    Developer Support Engineer

    Infragistics, Inc

    www.infragistics.com/support