Nezreli
Nezreli

Reputation: 1288

TreeView substitute?

I'm building a windows form for access control in our system. The TreeView control is perfect since everything can be (and should be) presented in a form of a tree. There should be several tree views (users & user groups, user groups & roles, roles & permissions, ...) and handling of access control is envisioned as drag&drop operation between these treeviews.

There is a caveat, which is a reason for this question. Nodes have few bool attributes (ie. insert, update, delete permission) which would make perfect checkboxes but treeView cannot have more that one checkbox per node.

So, is there a control which could look like a treeview (nesting is only 1-3 levels deep), have extensive drag&drop functionality and support few checkboxes for each item or can treeView be modified to support this?

Upvotes: 1

Views: 276

Answers (2)

Mike Nakis
Mike Nakis

Reputation: 61969

In theory, you can always try your luck with drawing the treeview yourself. Also, if it suits you, you can re-implement your own tree functionality by deriving from the listview control, and making use of the 'indentation' member of listview items. (Treeview is probably implemented on top of listview, making use of that member.)

But be prepared to have to write a lot of code and to have to do a lot of troubleshooting, because in my experience when you try to do anything out of the ordinary with these controls, they behave in a very clunky fashion.

So, if you can find a ready component somewhere which does exactly what you want, go for it. It will save you from a lot of headache.

Upvotes: 1

De ruige
De ruige

Reputation: 347

I suggest you take a closer look at the Telerik UI controls suite. They offer anything you need.

Telerik UI controls

Make sure to take a look at their Treeview and TreeListView controls.

Upvotes: 1

Related Questions