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

Tree View parent automatically checked when all child items checked

5 Answers 228 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mark Wells
Top achievements
Rank 1
Mark Wells asked on 31 May 2010, 08:54 PM
Hi,

I am using the treeview (from Q1 2010 SP1) to bind to hierarchial data items. All is working ok, but if all the child items of a parent item are checked, then the parent item gets automatically checked (even though it was checked). This is a problem for me as I need to be able to treat the parent item separately from the child items.

Is there a way that I can stop this from happening?

Thanks,

Mark

5 Answers, 1 is accepted

Sort by
0
Mark Wade
Top achievements
Rank 1
answered on 01 Jun 2010, 09:39 PM
If you set the IsTriStateMode to false, it will allow the checkmarks to work independently of their parents/children.  You can then manipulate the checks via code.
0
Mark Wells
Top achievements
Rank 1
answered on 01 Jun 2010, 10:25 PM
Setting the IsTriStateMode does not help (I believe the default is false for checkboxes). The checkboxes work independantly for the most part. The exception is when all of the child checkboxes are checked. When this happens the parent checkbox also becomes checked even though it was not set to be checked.

To be clear, I am setting the checkboxes to be checked in the code before it renders. After the code completes this task, the parent is still item.CheckedState = Automation.ToggleState.Off. So, something checks this parent before it is rendered (my code is not doing it).
0
Vladislav
Telerik team
answered on 03 Jun 2010, 01:27 PM
Hello Mark Wells,

Unfortunately we are not aware of such issue. Moreover your scenario looks quite complicated.
Can we ask you to send us a sample project demonstrating the problem in order to examine it in more detail?

Best wishes,
Vladislav
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
Mark Wells
Top achievements
Rank 1
answered on 03 Jun 2010, 05:16 PM
I have submitted a ticket so that I could send you a sample project that demonstrated the problem. The ticket ID is 315870.

Thanks,

Mark
0
Accepted
Vladislav
Telerik team
answered on 04 Jun 2010, 01:57 PM
Hi Mark Wells,

I have replied to your support ticket.
Can you please check my answer there.

Greetings,
Vladislav
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.
Tags
TreeView
Asked by
Mark Wells
Top achievements
Rank 1
Answers by
Mark Wade
Top achievements
Rank 1
Mark Wells
Top achievements
Rank 1
Vladislav
Telerik team
Share this question
or