Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a list of branch numbers that I want to display as the top-level in a tree view. Then, for each branch there is a list of names. Finally, under each name is a list of items. Each item has a number of columns. Something like this:

 

 

BRANCH 1

¦_Name 1

¦ ¦_item 1 aaa bbb ccc

¦ ¦_item 2 aaa bbb ccc

¦_Name 2

¦ ¦_item 1 aaa bbb ccc

¦ ¦_item 2 aaa bbb ccc

BRANCH 2

¦_Name 1

¦ ¦_item 1 aaa bbb ccc

¦ ¦_item 2 aaa bbb ccc

¦_Name 2

¦ ¦_item 1 aaa bbb ccc

¦ ¦_item 2 aaa bbb ccc

 

 

Is it possible to display this in a TreeView so that the "branch numbers" and "names" are collapsable/expandable?

 

 

Additionally, I need to be able to select individual items with checkboxes and be able to select groups of items with checkboxes on the "names" and "branch numbers" too. Is this also possible?

 

 

Would I be better off using a datagrid? Can a datagrid contain a 3-level hierarchy?

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

  • *Gurus*
Posted
I don't know about the datagrid, and I have never ownerdrawn a treeview. That said, it isn't difficult to do if you've got msdn and time to spare learning the messages and structures you need to hook in to it. You're going to have to do that if you want some nodes to be checkable etc.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

A datagrid can have n level hierachy... but dont forget that you want the checkboxes... this wold mean that you will have to create a custom column witch edits it self with a checkbox... so on...

 

The TreeView is a much better option...

 

Read these URLs carefully and you'll find your answer:

 

http://www.codeproject.com/cs/miscctrl/treeviewexplorer.asp

http://www.codeproject.com/cs/miscctrl/mwcontrols.asp

http://www.codeproject.com/cs/miscctrl/treeviewms.asp

Software bugs are impossible to detect by anybody except the end user.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...