Hi, all - I've gotten *this far* and am stuck. Basically I have:
_WinGrid as UltraWinGrid_TextEdit as UltraTextEditor_TabControl as UltraTabControl_TreeControl as UltraTree and then..._WinGrid.Band.Column.Editor = _TextEdit_TextEdit.ButtonsRight(0).Editor = _TabControl_TabControl.Tabs(0).Controls = _TreeControl
I've got it all hooked up so that the UltraTextEditor's dropdown button displays the tab control, the tab displays the correct tree (there are actually two) and I can preset the correct node and close up the control after the selection changes.
Now I'm getting fancy. I want it to behave like a real combobox. I'd like to allow the user to begin to enter text in the UltraTextEditor, and as they type, look up in the UltraTree to find the 1st node that starts with whatever they've typed, and flesh out the rest of the UltraTextEditor with the text of any match.
However - I have set up event handlers for _TextEdit.ValueChanged and _TextEdit.TextChanged - and neither of them are firing. In fact, whenever I stop the program and do a real-time check of _TextEdit.Text or .Value, it always and invariably says "UltraTextEditor1" - which is not the name of the control, and CERTAINLY not the text in the cell.
_WinGrid.TextChanged isn't getting fired either.
So, my question mainly is, where on earth do I hook up a handler to tell when the text in that box changes?
Thanks,
Rob
Okay.
A coworker mentioned that the "TextChanged" event on the grid wasn't what I wanted - it was the "CellChanged" one instead.
Capturing it there and all is well.
HOWEVER - why on earth, when I set the ultratexteditor to be the editor for that cell, is it not getting the text changed events? This was painful to try to troubleshoot.
Thanks again,
Hi Rob,
When you assign an EditorContorl to the grid column, the grid does not use the control itself. The editor control merely provides a copy of it's own internal editor to the grid so it can use it. So no events on the editor control will fire when you are performing operations on the grid. The grid has it's own events for this. If the editor control's events fired, you would not be able to distinguish between something that occurred in the grid and something that occurred in the control.
The only exception to this is the EditorButton events. These events exist because the grid has no events for these buttons. The grid doesn't know they exist, because they are specific to the editors themselves. These events pass in a context so you can tell which cell in the grid is firing them, or if it's the control itself.