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

TriStateMode and checkboxes

3 Answers 92 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 31 Mar 2010, 09:36 PM
Q1 2009 SP1 Winform RadTreeView

Why is it that 'node.Checked' doesn't seem to get evaluated when TriStateMode is False?

If TriStateMode is True 'node.Checked' gets evaluated as expected.

I'm trying to uncheck all checkboxes in my RadTreeView without using TriStateMode. Is there another approach I should be using (without using TriStateMode)?

Thanks,
Matt

3 Answers, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 02 Apr 2010, 04:04 PM
Never mind. My code was at fault.
0
Victor
Telerik team
answered on 06 Apr 2010, 04:38 PM
Hello Matt,

Thank you for writing.
The recommended way to check or uncheck nodes in RadTreeView is to use the SetCheckBoxCommand.
For example:

RadTreeView.ExecuteBatchCommand(tv.Nodes[0], -1, new SetCheckBoxCommand(), true);
The arguments above have the following meanings:
tv.Nodes[0] indicates the node in the tv RadTreeView from which the command will start.

-1 means that the whole hierarchy below Nodes[0] will be affected.

new SetCheckBoxCommand() is obvious. Passing instances of different commands causes different changes in the nodes hierarchy (in this case checking or unchecking nodes).

true means to check the nodes. Passing false on the other hand will uncheck them.

Please refer to our online documentation for more information on how to use the commands, what commands are provided out of the box and how to create custom commands.

Please write again if you have other questions.

Best wishes,
Victor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Stefan
Telerik team
answered on 22 Mar 2011, 03:14 PM
Hi Matt,

Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out. For more information on our latest release refer to this blog post

Kind regards,
Stefan
the Telerik team
Tags
Treeview
Asked by
Matt
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Victor
Telerik team
Stefan
Telerik team
Share this question
or