Hi,
Not sure this is going to be possible, but...
Within one of our projects we have our own inherited version of the ultragrid with various customisations. It is used exclusively through the project when a grid is needed. Typically when used on forms it will have a context menu attached to it, hosted as part of an ultraToolbarsManager. This is set via the "ContextMenuUltra on...." property. We would like to add a standard menu entry to all of our grids, and ideally this would be handled entirely within the grid, to reduce the impact on the rest of the project. This is what I would like to be able to do, all within our grid class (that inherits from the ultragrid):
1) Look for the attached context menu
2) Dynamically create a new entry at the bottom of that menu
3) Wire an event handler to the new entry so that pressing it can be handled within our grid code
Does that seem possible?
Kevin
Thanks, I'll download the project and take a look
Hello ,
Yes you could build-in custom context menu to your class derived from UltraGrid. So you should add UltraToolbarsManager to your class deride form UltraGrid , and to add predefined items. Also you will need collection which will keep Extended tools which could be added at run time. Also you should design at least to events for the grid, one which will occurs before context menu drop down, it will be a cancelable event which will allows you to add additional tools to the context menu. Second which will occurs when any of the extended tool is clicked. I’ve implemented this suggestion in a small demonstrative sample, please see attached zip and let me know if this is what you are looking for. Please feel free to modify my code based on your custom needs.
I hope that this will helps you.