Home - Forums-.NET - FlyTreeView (ASP.NET) - dataset tabular

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

dataset tabular
Link Posted: 20-Jun-2007 08:59
I am building tree with tabular data from one table, Table A.
In Table B (relation with Table A) there are more data.
How can I build tree with data from diffrent tables ?

TableA dept 0 data0
TableA dept 1 data1 and 5 subnodes/rows from Table B)
TableA dept 1 data2 and 3 subnodes/rows from Table B)
TableA dept 2 data3  and 2 subnodes/rows from Table C)

Thanks!
Link Posted: 20-Jun-2007 11:30
If you're going to use ConvertToHierarcical.... method in order to convert tabular data into hierarchical, then your source data should be a single table/array/etc.

From my point of view, you should simply bind root nodes to TableA, add a FlyTreeView.NodeDataBound event handler and use it to bind every root node.ChidNodes collection with the required data (from TableB, TableC, whatever).

Note: node.ChildNodes supports DataSource and DataBind() so every node can easily populate its child nodes from datasource.

P.S. Anyway you should use FlyTreeView.ConvertTabularDataToHierarchical(..) method to covert data for root nodes and for child ones.