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

Setting Indeterminate check state on client side

3 Answers 197 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Aykut
Top achievements
Rank 1
Aykut asked on 01 May 2009, 08:58 PM
Hi,
Is it possible to set a node's checked state to indeterminate even if it doesn't have child nodes?
And I want to do it in clinetside.
Regards.

3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 04 May 2009, 08:12 AM
Hi Aykut,

Here is some sample code which will make a tree node look as indeterminate:

        <script type="text/javascript">
            function onLoad(sender, args) {
                var node = sender.get_nodes().getNode(0);
                node.get_checkBoxElement().className = "rtIndeterminate";
            }
        </script>
        <telerik:RadTreeView runat="server" ID="RadTreeView1"
            TriStateCheckBoxes="true" CheckBoxes="true" OnClientLoad="onLoad">
            <Nodes>
                <telerik:RadTreeNode Text="Node1"></telerik:RadTreeNode>
            </Nodes>
        </telerik:RadTreeView>

Kind regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
mirang
Top achievements
Rank 1
answered on 05 Mar 2012, 09:44 AM
This only works when the Tristatecheckboxes=true and checkchildnodes=true is set. Is it possible to have the same thing when the tristatecheckboxes=false ?
0
Bozhidar
Telerik team
answered on 06 Mar 2012, 12:45 PM
Hi,

An answer to the question has already been provided in the following forum topic:
http://www.telerik.com/community/forums/aspnet-ajax/treeview/set-indeterminate-on-the-client-side-when-tristatecheckbox-false.aspx 
 
Kind regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Aykut
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
mirang
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or