Hi All,
I have a tree consisting of two columns. The first column has a valuelist and uses an UltraComboEditor for each of it's cells. The second column has no valuelist but the type of editorcontrol used for each cell changes depending on the value in column 1.
For some reason I cant get this to work correctly. When I change the value in column1 the editorcontrol for the cell in column2 does not change straight away, if I click on the cell in column2 a few times however the editorcontrol eventually updates.
I assume that I am just not using the EditorControl property of the cell correctly. Currently I am just setting the EditorControl of the cell to a new control each time I change the value in column1, I have also tried calling RefreshEditorControl() and RefreshEditor() on the cell but it doesn't help. Any ideas on what may be going wrong?
Thanks in advance,Denis
The editor doesn't know that it has just been designated for use in a new host, so you have to call UltraTree.UIElement.DirtyChildElements after assigning the new editor.
Also note that as far as I know there is no such method as RefreshEditor/RefreshEditorControl, so I am speculating a bit but I assume you mean ResetEditor/ResetEditorControl. If this is the case don't do that because that sets the property back to its default value, which is null, which causes the default editor to be reinstated.
Hi Brian,
Thanks for this, yes I did mean ResetEditor not RefreshEditor. I notice that calling UltraTree.Refresh after assigning the editor foxes the problem too.
One other small issue I am having is.....I create a new ultratexteditor with a dropdownbutton added to its ButtonsRight collection and assign this to the cell. When I then click the button I get a System.InvalidOperationException saying "The associated editor must be in edit mode to be dropped down". If I click in the text area first and then click the button it works fine so is there a way I can force the texteditor into edit mode without having to actually click in the text area first?