What is the best way to load this tree (c# & sql question)

From: D (Dave_at_nothing.net)
Date: 03/20/05


Date: Sun, 20 Mar 2005 16:05:57 -0500

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



Relevant Pages

  • Re: Compact Syntax for OR Condition
    ... Select Case var ... Case apples, bananas, oranges ...
    (microsoft.public.access.modulesdaovba)
  • RE: countif bigger than zero fractions
    ... the distinction to see the number of apples possible in a container. ... I'm guessing that the 1/2 quantity for Bananas is text, ... I want to use a Countif function or something similar to add up the total ... if I leave Oranges blank it ...
    (microsoft.public.excel.worksheet.functions)
  • controlling one list box by another
    ... fruits from the lstBox1, ... I'd like the lstBox2 to show apples, oranges, & bananas. ...
    (microsoft.public.access.forms)
  • Replace characters from cell values
    ... I would like to remove the number and dash from the cell values as ... - Apples ... - Oranges ... - Bananas ...
    (microsoft.public.excel.programming)
  • Re: Androcless accusations of lying
    ... ct is scalar multiple of x, otherwise it may already be squewed or ... Oranges, and apples, if you like. ... Of course, I'm talking about real physics and sanity, not theoretical ...
    (sci.physics.relativity)