Hello!
i have a DataSet with this tables.
How can i load this data into a treeview instead of looping through all these tables and creating nodes?
basically i have one row from P table which must be the root node of the treeview, so only one root node, then i have n A rows that belongs to the P row(this is done by the table pToA) and the F table describes how A rows are child of each one.
Thank you
Thank you.
I'm not clear on why you need the 'PtoA' table...it would seem you just need a 'ID_P' field in table 'A', which contains a value which relates to the 'ID_P' field in table 'P' (similarly to the way the 'ID_A' field in table 'F' relates to a record in table 'A'). In any case, once you have the data structured properly and relations defined, you assign a reference to the DataSet to the control's DataSource property.
The DB is highly normalized. If you remove the "PtoA" table it means that you have to duplicate informations in "A" table. Same thing for "F" table