How to allow users to select their own grouping for a .NET TreeView control

Posted by Chapso on Stack Overflow See other posts from Stack Overflow or by Chapso
Published on 2010-06-03T00:58:24Z Indexed on 2010/06/03 1:04 UTC
Read the original article Hit count: 299

Filed under:
|
|
|
|

I am using a treeview to display projects, tasks, time entries, and the people who are working on a project. I would like to allow the user to define a custom grouping (ie. Project->Task->Time Entries or Project->Date (of time entry)->Task->TimeEntry).

The relevant groups would be Project, Task, Time Entry, and Person, with some metadata from them. I want to have some modular way to allow a user to specify how they would like to display the information.

Does anyone know of a good method by which this can be done? I currently have hard-coded a display which looks like this:

Project  
  Task
    Time Entry
Next Project
...

My thought is to do something like write methods to display each type and somehow let a user select what order the display would group.

Please let me know if I am not being clear enough.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about vb.net