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.
In the code above I've written col.EditorControl = uteControl; wich assign the UltraTextEditor. Anyway, if it is not assigned, you have no buttons, and if you have no buttons, how would it be possible for me to know that it is possible to click it.
I also said that I've tried Event from grid, UltraTextEditor, and Button himself, which include EditorButtonClick what you should have understand if you read my second post where I said that the button work in edit mode
I also replied that I have found that the event is not trigged because I block the edit mode and you need to be in edit modeto click that button things I wanted to avoid
Finally, I don't want a drop down, I want a popup window with detailed information about the result given in the same cell, and modify the property of the calculation of that row, if needed.