Hi,
I want to have a column with text and a button that we can click to have a popup to modify some option relative to the cell content.
I added the button with the following
UltraTextEditor uteControl = new UltraTextEditor();
EditorButton editorButton = new Infragistics.Win.UltraWinEditors.EditorButton();
uteControl.ButtonsRight.Add(editorButton1);
editorButton.Text = "...";
UltraGridColumn col = GetColumn(grid, "ColumnName");
col.EditorControl = uteControl;
But now, no event is trigged. I trie all event from the grid, the button, and the UltraTextEditor.
The button don't even get in pushed state when clicked
Is there a way for me to achieved that?
Thanks
I found the problem, I block the EnterEditMode, and I need to get in Edit Mode to be able to click the button that is strange behavior to me, but I'll do a workaround with a homemade grid
No grid event will fire when you click the button. You need to handle the EditorButtonClick event of the UltraTextEditor control. The e.Context property in the event args will give you the cell that was clicked.
If you want a dropdown in the cell, you might want to consider using a DropDownEditorButton instead of just an EditorButton, though.
Also, I notice that the code you posted here creates a new UltraTextEditor control in code, but never adds it to the Controls collection of the form. Are you disposing this control elsewhere in your code? If not, then you are creating a potential memory leak since this control will never get disposed. You should probably add the control to the Controls collection of the form so that it gets disposed when the form does.