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
530
UltraTextEditor in a tree node
posted

In looking through the forums, I've found a lot of variations on this theme but most of them deal with it in the context of a grid rather than a tree.

For certain nodes within my tree, I want to display the checkbox, a dropdown list that has three or four choices, and then the node's text.  Currently, I'm setting the EditorControl to  a UltraTextEditor with a DropDownEditorButton in the ButtonsLeft collection.  This DropDownEditorButton hosts a UltraListView.  Everything looks perfect, but I need the text in the UltraTextEditor to be read-only.  I have tried quite a few approaches including setting the UltraTextEditor's readonly property to true, various combinations of the node's CellClickAction and AllowCellEdit properties, trapping the BeforeEnterEditMode event and cancelling it.  What is the simplest way to accomplish what I'm after? 

 

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    l99057j said:
    What is the simplest way to accomplish what I'm after?

    As you know, you can't use the ReadOnly property because that will prevent the buttons from responding to clicks. What you need to do is handle the KeyPress event and set the Handled property of the event arguments to true when the ActiveNode is in edit mode and it is one of these nodes that should not allow typing. UltraTreeNode exposes an 'IsEditing' property which tells you whether that node is currently in edit mode.

Children
No Data