Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to show employee Hierarchy in Tree view structure. Most of the code what i have seen is tree view list. We need specifically in Tree with multiple Hierarchy. any help will be appreciated.
Posted
Comments
BillWoodruff 17-Apr-15 6:37am    
What technology stack from Microsoft are you using ? Doesn't it offer a TreeView Control ?
Member 11422511 17-Apr-15 6:51am    
tree view control offers tree view list not Tree view

1 solution

Wrong. Standard tree view can show any arbitrary tree, including binary tree, of course (but not arbitrary graph which is not a tree).

Also, who told you that organization's hierarchy can be represented by a binary tree? It would simply mean that each supervisor supervises work of exactly two employees. Where did you see such organizational principle? :-)

[EDIT] In response to the discussion in comments:

I understand that the development of very complicated and/or highly customized UI could be prohibitively difficult, so I want to suggest one very simple idea: use a regular tree view, and it the presentation capacity of such a small thing as a tree view item seems too small to you, I will suggest how to add mode detail to the presentation. Actually, with ASP.NET/MVC, you have more flexibility in the presentation of tree view item, but first, let me explain the design I consider as the simpler one.

You can make a combination of this tree view, and say, a panel. Create, say, a user control with the tree view docked on left, and some panel on write (this is for the cultures using left-to-write writing, the opposite for some other). You may want to have a splitter control between them. Handle the events when you change the item selection in a tree view. On this event, each time it is invoked, take the tree node data and present it in full detail on your right. This design is very intuitive to the users and can be easily implemented on all kinds of UI libraries.

If you want to implement something much fancier, more unusual and non-standard, I can help you, too, but it will take a lot more work, so first look critically at your UI development skills.

—SA
 
Share this answer
 
v4
Comments
Member 11422511 17-Apr-15 3:47am    
Sorry for Adding specific word Binary tree. Actully i serched by giving the name as a tree so most of solution i got is for Tree list structure. Thats why i by mistake put binary tree. I want organization structure in arbitary Tree but not Tree List.
Sergey Alexandrovich Kryukov 17-Apr-15 12:27pm    
Please, no need to apologize; we all do some mistakes. So, we came to the idea that the tree view is quite sufficient to show any three structure, at least in some default way (which can be further customized). If your organizational structure is pure hierarchical, tree view is suitable. So, what's the problem with using it.

I understand that you could have an idea of some more "fancy" presentation, say, more graphics or even more convenient (I would be very careful about judging on convenience, which is easy to spoil then to improve). But then you should have to describe your idea in very fine detail, and also tell us What have you tried so far.

In the meantime, I can give you one very simple idea. Please look at my update to the answer, after [EDIT].

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900