Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1205
Changing EditorControl of a TreeNodeCell
posted

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

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    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.

Children