I am not 100% sure what bean you are referring to. Sounds like the DBTreeViewBean is what you want. If yes, check out the sample solution servoy_sample_treeControl.servoy that is installed in Servoy/solutions/examples. This should help you to get started.
Now I see your problem. I don’t think you can do that right now. I guess the real problem is that a dataprovider is used to show the node text. In your case, two dataproviders would be needed. So somehow you need to create a table/view that manages both in one table.
Well, I’ve being doing that for months…
Just create a calculation in table 1 and a calculation in table 2, both calcs must have the same name but can return diferent data (“dbtree_label” could return the catgory name in table1 and the subcategory name in table2) then select the relation that you want to use when initing the bean (table1_to_table2) and voila!
Besides the technique Nicola uses and the Treeview bean it2be offers, the DBTree(table)View bean that ships with Servoy 3.5.3 also offers the functionality to have the child nodes of a node come from a different table.
While creating a demo solution to explain the technique, we ran into an issue making the demo not really worthwhile, untill fixed.
This issue will be fixed in 3.5.4, due to be released later this week.
Once 3.5.4 is released, I will post the sample solution showing all the different options of the latest version of the bean.