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
45
Disabled UltraTree : no AfterActivate ou AfterSelect event
posted

Hi.

I replace a classic treeview by an UltraTree.

All seems OK but the events AfterActivate or AfterSelect are not fired if the control is disabled.

The user cannot select a node, but via program I select a specific node and I need the event AfterActivate show some infos.

With the classic Microsoft Treeview this is working, not with UltraTree.

How could I implement this workflow ?

Best regards.

Clauyde

Parents
  • 21795
    Verified Answer
    Offline posted

    Hello Claude,

    Yes, you are correct. By design UltraTree does not allow you to select via UI or through code any nodes if the tree is not Enabled. What you can do to work-around this behavior is Enable the tree, select the node you need to, and disable back the tree. You can use code like this:

    this.ultraTree1.Enabled = true;
    this.ultraTree1.Nodes[1].Selected = true;
    this.ultraTree1.Enabled = false;

    Note, that if you are facing some flickering you can also suspend layout for the tree before you call the above code and resume the layout after.

    Please let me know if you have any additional questions on this matter.

Reply Children
No Data