Say you have three tables apples, oranges and bananas and each table has a
different amount of fields that are obviously particular to that type of
fruit. Now I want to load them into a form based tree control with each
table having it's own separate node.
In the tree load function what I did was create three sql data readers and
manually iterate through adding the nodes and related info. While this works
I was wondering if there was a better method.
I was playing around with this code sample from codeproject.com where the
author sets the tree's data source to a dataview and creates node grouping
but that cannot apply here because there can only be one data source for the
tree and not three connected to the three primary nodes (apples, oranges and
bananas) And second it won't work because I don't have a sql statement
that'll return a single set of data that contains all of the data. I tried
unions but due to the unequal amount of fields it's not working out for me.
So is what I've done good enough?
Thanks