Hello Sehboo,
How would you show the hierarchy of employees (or locations or
roles...whatever) without using tree view on the web using asp.net. We
have thousands of records, and if we use tree then loading that tree
would take forever. I want to have something else which is simple and
intuitive.
Also, how would you have user add/remove people from that hierarchy?
You have an interesting problem. I started to give the "standard" answer
which is to fill in part of the heirarchy and the, as the user clicks
around, fill the rest. To do this well on a treeview control, you'd need to
use XMLHTTP to get more data in an async fashion. This would be pretty
difficult for me (but not for a really good javascript coder, I suppose). I
disliked my answer so much that I deleted it and started again.
On the other hand, perhaps the problem is not really what it seems. What
does the USER want to get out of the interaction? To know where they are in
the overall heirarchy? I would say that perhaps, a sufficient approach is
to show a single manager and the list of their employees as a diagram. Each
of the names can be clicked. Clicking on a name produces a post-back and
paints a new page, with that name in the manager's spot. Have a button for
"move up to manager" from the manager's spot on the diagram.
You could take this to a little bit more sophistication if you show a person
in the middle, all direct reports below them, all peers next to them, and
that person's maanger above them, and allow any of them to be clicked. If
one of those people are clicked, repaint the page with that person in the
middle.(as I type, this is the approach that I like the most).
If you dig around in one of the catalogs of controls, you may find that this
control has already been created and that you can buy it for a small sum. I
would not be surpised to find it there.
Good luck,
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--