Hi,
I am using ultra combo as a Editor control in my ultra grid. Befor that I added two editor buttons in the combo.Those buttons are working fine when I put combo on form. But if I use same combo as a editor control in ultra grid then click event of the buttons are not firing. Please advise on how to fire this button click events.]
Regards,
Ganesh.
Thank you Mike. Now its working :-)
Well, there's no tooltip property on the button itself. What you would have to do is apply a tooltip tothe control based on the position of the mouse. You can use UIElements to determine when the mouse is over an editor button. Something like this:
private void ultraGrid1_MouseEnterElement(object sender, UIElementEventArgs e) { if (e.Element is EditorButtonUIElement) { EditorButton button = e.Element.GetContext(typeof(EditorButton)) as EditorButton; Debug.WriteLine(button.Key); // Set the tooltip here. } } private void ultraGrid1_MouseLeaveElement(object sender, UIElementEventArgs e) { if (e.Element is EditorButtonUIElement) { // Clear the tooltip here. } }
Thanks for your valuable advise.
Now I am facing another one problem. I want to set ToolTip for those EditorButtons but
I am not getting proper way to do this. How do I do this?
The reason it does not work is because the button in the grid is not the same button as the one in the combo, it's a clone.
The easiest thing to do is to trap the EditorButtonClick event of the combo control. Or you could try to get the EditorResolved from a cell and cast it into an EmbeddableEditorButtonBase, get the buttons from there and trap the click event of those buttons.
Same thing I am doing.
I am trapping click event of EditorButtons whatever I added in the Combo.
But they are not firing if I use combo in Grid as a EditorControl.