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
370
UltraTree: recognizing root by "Parent_ID = ID" instead of "Parent_ID IS NULL
posted

Hi all,

in my application A, a reflexive parent-child datatable provides data for an UltraTree. This works well as long as the hierarchy is built up using "Parent ID IS NULL" for root entries.

In a different application, B, the roots are identified by "ID = Parent_ID". So I need to change the comparison UltraTree uses to find root nodes.

Is there a way to do so?

Thx

Martin

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Martin,

    The WinTree doesn't give any special significance to null. Assuming your tree is bound, then the tree simply shows whatever data the DataSource and the BindingManager gives it. Typically, when you set up a recursive relationship, the child nodes show up both at the root level and also under their parent nodes. And one way to get around this is to handle the InitializeDataNode event and hide the root note that are really child nodes. That's what our sample does. So if that's what you are doing, you just need to change the code in InitializeDataNode to watch for a particular parent key instead of null.

Reply Children