Hi!
I need to catch a mouse event on a cell editor with combo (UltraCombo in ValueList) to put a context menu but I don't find how I can. The Mouse Down event is not raised on the wingrid nor in the combo. How can I do this ?
This brings me to ask another question. In wingrids, what king of editors should I use ? In my case, for combo, I set ValueList = UltraCombo to have multiple columns and I used EditorComponent for textEditor and numericEditor. It is not clear what I should use. Editor, EditorComponent, ValueList for combo etc. ? Somebody can help me with this purpose ? Keep in mind that I want to catch mouse events on these editors.
Best regards,
Benoit
Hi Benoit,
You could create your own combo using an UltraComboEditor and a WinGrid. Then you could show a context menu from the WinGrid. Here's a post which explains this technique.
UltraComboEditor - Can I Use a Custom Control for the DropDown? - Infragistics Community
FrancisVital said:And what if I want to replace the current context menu on this combo? I don't find either how to do it.
Do you mean the context menu that shows up in the TextBox portion of the combo? This is not different than any other control like the inbox TextBox or ComboBox. You simply apply a new ContextMenu to the control via the ContextMenu extender property provided by the ContextMenu or ContextMenuStrip component.
I don't have any other questions, since it is not possible to catch mouse events on combo in a grid. That's bugging me and I don't know how I will resolve my problem. And what if I want to replace the current context menu on this combo? I don't find either how to do it.
I see you and Mike have been chatting but I was wondering if you have additional questions.
Marianne
Which editor you use depends on what you need. There's not enough information here for me to determine which editor you should be using, since I have no idea what your data source is or why you are using an editor at all.
The vast majority of the time, you do not need to use an editor at all. The grid will choose a default editor based on the data type and certain property settings of the column such as Style and ValueList.
FrancisVital said:I need to catch a mouse event on a cell editor with combo (UltraCombo in ValueList) to put a context menu but I don't find how I can. The Mouse Down event is not raised on the wingrid nor in the combo. How can I do this ?
Regarding the UltraCombo and MouseDown, I don't think there is any way to do this.