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
Hi Martin,
Yeah, that's a little more complex to set up, but overall it's a better way to do it. :)
Hi Mike,
thanks for your quick reply.
I went the less-coding-way:
root rows in datatable dtroot (doing the right comparison)
all rows in datatable dttotal,
2 Relations (selfjoin and root-child-relation)
Now it works like a charm!
Thx!
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.