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

Checked nodes with no checked childrens don't show

6 Answers 78 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Fernando
Top achievements
Rank 1
Fernando asked on 15 Dec 2008, 11:50 AM
Hi all,

I´m having some problems checking nodes of my RTV. My RTV has tri-state check boxs. Programatically I search for some nodes, using FindNodeByValue(number_of_my_node), and then if i'ts not null, set the node.Checked property to true.

This works well for all nodes (node is show checked) except that ones that has children, but no one children is checked. In this case, the node it's shown unchecked, but if you get all checked values using CheckedNodes, the number_of_my_node is returned correctly.

Can anyone help me with this issue.

Thanks.

Fer.


6 Answers, 1 is accepted

Sort by
0
Tim
Top achievements
Rank 1
answered on 17 Dec 2008, 06:26 PM
I can't offer a solution to this problem but we are also having the same problem when trying to check top level boxes that don't have any sub nodes checked.

Tim
0
Veselin Vasilev
Telerik team
answered on 18 Dec 2008, 12:55 PM
Hi guys,

Thank you for reporting this.

The parent node should not be checked in this case because its state depends on its children. Since there are no checked children - the parent will be shown as unchecked.

We will research the cause of the problem with the CheckedNodes collection containing that parent node and fix it.

Fernando, I have updated your Telerik Points.

Best wishes,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Fernando
Top achievements
Rank 1
answered on 18 Dec 2008, 01:17 PM
Hi guys,

I've set the TriState property to false, and now it works. I've lost the indeterminate state, but my treeview is checked is I want.

Anyway, I think there is a bug, cause eventhouth the parent node is show unchecked, the value of the checked property of the node is set to true.

Thanks for all,

Fernando.
0
Veselin Vasilev
Telerik team
answered on 18 Dec 2008, 01:42 PM
Hi Fernando,

Actually, it is by design.

We render the checked state (checked, unchecked, indeterminate) and not the Checked property.
Since in your initial case the state of the parent node is unckecked (because all its children are unchecked) it is rendered as unchecked. The CheckedNodes collection contains all nodes which have their Checked property set to True.

If you set the CheckChildNodes property to True, it will work as you want - but it will check all the children automatically.

I hope that ti is clearer now.

Kind regards,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Andrea
Top achievements
Rank 2
Iron
answered on 28 May 2009, 05:21 PM
Hi,

I think that the current behavior is wrong. Trough the web-interface I can check a parent node without checking its child nodes, then you must make this possible also trough server-side code.

 

Best Regards
0
Atanas Korchev
Telerik team
answered on 29 May 2009, 07:15 AM
Hi Andrea,

We will consider improving this behavior in a future release of 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.
Tags
TreeView
Asked by
Fernando
Top achievements
Rank 1
Answers by
Tim
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Fernando
Top achievements
Rank 1
Andrea
Top achievements
Rank 2
Iron
Atanas Korchev
Telerik team
Share this question
or