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
230
Context menu not working for the grid cell with custom editor
posted

Hi,

I use UltraControlContainerEditor to build custom date time editor for the grid. I create a menu in ultraToolbarsManager1 then set the context menu for the grid.

this.ultraToolbarsManager1.SetContextMenuUltra(this.grid, "GridPopUpMenu");

The "GridPopUpMenu" shows correctly when the cell is in display mode. However, when it is in Edit Mode, the "GridPopUpMenu" does not show. It just show the normal context menu for a text box.

Do we have anyway to fix this?

Parents
No Data
Reply
  • 960
    Verified Answer
    Offline posted

    Hello Kim,

    I've investigated your issue that context menu does not pop up on cells which use UltraControlContainerEditor when they are in edit mode.

    In order to achieve what you want to do, you could assign the same context menu to the editor you use when those cells are in edit mode. For example, if you use .NET DateTimePicker as EditingControl of UltraControlContainerEditor, you could specify the context menu for the DateTimePicker's instance, like this:

        ultraToolbarsManager1.SetContextMenuUltra(dateTimePicker1, "GridPopUpMenu");


    I attached a sample application. In the sample application, I put a DateTimePicker and an UltraGrid on the form and specify an editor which inherits UltraControlContainerEditor for grid's "Date" column's editor. The editor itself uses the DateTimePicker instance as EditingControl. And I call the above method in the form's load event.

    I hope this will help you.


    Best Regards,

    Noriko I.
    Developer Support Engineer
    Infragistics, Inc.

    WindowsFormsApplication2.zip
Children
No Data