Windows Form Controls

I have some data from a database that I need to some how show on a form in a nice way... A little background:

I'm working on a home inventory system for my collection of junk so that if everything burns down I'll know what I used to have.. or if something get's stolen ( you get the idea)

I have a property table who's PK is propertyID, There is also a column in this table with referenceId that refers back to a valid propertyId in the same table.  My reasoning is that I may have a computer has one piece of property, but then later on I can add on a new video card, peripheral or something, And I wanted to make sure to note that this is a video card for my computer.. and not another server or something that I have in the house.

I don't understand tree controls but I need a way to display this data so that a user can use pick from a hierarchial list.

Any ideas or code samples would be great
Who is Participating?
TheAvengerConnect With a Mentor Commented:
Following is a short example from MSDN about TreeView. You can find much more in sites like This may be interesting for you:

// Create a new ArrayList to hold the Customer objects.
private ArrayList customerArray = new ArrayList();

private void FillMyTreeView()
   // Add customers to the ArrayList of Customer objects.
   for(int x=0; x<1000; x++)
      customerArray.Add(new Customer("Customer" + x.ToString()));

   // Add orders to each Customer object in the ArrayList.
   foreach(Customer customer1 in customerArray)
      for(int y=0; y<15; y++)
         customer1.CustomerOrders.Add(new Order("Order" + y.ToString()));    

   // Display a wait cursor while the TreeNodes are being created.
   Cursor.Current = new Cursor("MyWait.cur");
   // Suppress repainting the TreeView until all the objects have been created.

   // Clear the TreeView each time the method is called.

   // Add a root TreeNode for each Customer object in the ArrayList.
   foreach(Customer customer2 in customerArray)
      treeView1.Nodes.Add(new TreeNode(customer2.CustomerName));
      // Add a child treenode for each Order object in the current Customer object.
      foreach(Order order1 in customer2.CustomerOrders)
           new TreeNode(customer2.CustomerName + "." + order1.OrderID));

   // Reset the cursor to the default for all controls.
   Cursor.Current = Cursors.Default;

   // Begin repainting the TreeView.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.