Reputation: 1
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
Reputation: 31
Please try this code:
TreeNode node = new TreeNode();
node.SelectAction = TreeNodeSelectAction.None;
Upvotes: 3
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