This is a migrated thread and some comments may be shown as answers.

[Solved] Help with the treeview control

0 Answers 80 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
carlg
Top achievements
Rank 1
carlg asked on 16 Aug 2010, 03:30 PM
I'm looking for some help with the treeview control.

Let's say I have a C# class called car and they form a hierarchy; for example I may have the following in my treeview; each node in the treeview represents 1 instance of the car class.

-Cars
----Blue Cars
----------Big cars
----------Little cars
----Red Cars

Each type of car has many characteristics associated with it which are represented by the class.  For example the car class may look something like this:

class car {
         decimal motorsize;
         string description;
         string manufacturer;
         string color;
}


On the screen, there is a text box for each of the properties in the class.

When the user clicks on the node for "Little Cars", I want the text boxes for motorsize, description, etc. to be populated accordingly.  Then when the user clicks on the "Red Cars" node, the text boxes should be updated.

Does anybody have any suggestions how to do this with the treeview control?

Thanks for the help!!
Tags
TreeView
Asked by
carlg
Top achievements
Rank 1
Share this question
or