tags:

views:

59

answers:

1

I have a treeview1:

             treenode--
                  treenode1--
                     treenode2
                     treenode3

You can select only node2 and node3 if you want to display them parameters. How can i block selecting node and node1? I try like that,but than you can select all nodes:

    private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
    {
    ...
     }
A: 

you will have to use SelectAction Property on the tree node. you will need to set it on the node when you are creating them.

set selectaction=none on node and node1

Vinay B R
number of nodes depends on file, i'm not doing it manually...
does not matter, on nodes you do not want select set Selectaction as none
Vinay B R
But there isn't any "Selectaction"
what do you mean by there is n select action. <asp:TreeNode Text="node" SelectAction="None"/> and in codebehind you can use Node.SelectAction = TreeNodeSelectAction.None;
Vinay B R
Sorry, i was meaning treenode, not node. When i want to write: 'SelectAction' i can't do it.