Mathew
Mathew

Reputation: 1

Treeview node disable

I have a treeview and the nodes are populated from a table . I want to disable some particular node according to the name of that node

Upvotes: 0

Views: 2555

Answers (2)

jaite
jaite

Reputation: 31

Please try this code:

TreeNode node = new TreeNode();
node.SelectAction = TreeNodeSelectAction.None;

Upvotes: 3

David
David

Reputation: 3609

I assume that you are getting the data from your table then building your treeview by iterating your data and creating a treenode for that row and adding to the treeview.

In which case when you create the treeviewnode you can enable/disable at that point.

Upvotes: 0

Related Questions