This is a migrated thread and some comments may be shown as answers.

Disable node selection when using checkboxes?

1 Answer 54 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mark Schuh
Top achievements
Rank 2
Mark Schuh asked on 11 Aug 2010, 02:57 PM
Hello, 
We are using checkboxes to indicate selection...

Is there a property/method to disable node selection?  We'd like to disable the "selectability" of nodes.
...or is this done via CSS?

Also, is there a way to check the corresponding checkbox when the node is clicked?

Thanks,
Mark

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Aug 2010, 10:50 AM
Hello Mark,


Here is the code that I tried for a similar scenario.

mark-up:
<telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" OnClientNodeClicking="OnClientNodeClicking">
     <Nodes>
          . . .


client code:
<script type="text/javascript">
    function OnClientNodeClicking(sender, args) {
        var node = args.get_node();
        node.set_checked(!node.get_checked());
        args.set_cancel(true);
    }
</script>


-Shinu.
Tags
TreeView
Asked by
Mark Schuh
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or