Hi,
I have a treeView on my user interface that consists of 3 levels. The tree is bound to objects which are linked using the HierarchicalDataTemplate.
Each Object has a property isChecked which is bound to the container's CheckState. This Works great if the user is editing the treeview by checking and unchecking the tree nodes. However, when i load the treeview items from the database i programmatically set the IsChecked property of the 3rd level node either to true or false.
The telerik behaviour when there is a checked child node then the checkbox of the parent will have [-] as it's state and if all of the children checkboxes are checked then parent will be checked likewise.
This is not being reflected when i programmatically check child nodes. I.e. the parent node's checkbox state doesn't reflect it's children checkstates.
Am I doing something wrong here ? and if this is the default behaviour is there an event/method that i can execute or raise so that the parent nodes will update their checkstates based on their children nodes?
Best Regards,
Abdul
I have a treeView on my user interface that consists of 3 levels. The tree is bound to objects which are linked using the HierarchicalDataTemplate.
Each Object has a property isChecked which is bound to the container's CheckState. This Works great if the user is editing the treeview by checking and unchecking the tree nodes. However, when i load the treeview items from the database i programmatically set the IsChecked property of the 3rd level node either to true or false.
<
telerik:ContainerBindingCollection
x:Key
=
"TreeViewItemContainerBindings"
>
<
telerik:ContainerBinding
PropertyName
=
"CheckState"
Binding="{Binding IsChecked,
Mode
=
TwoWay
, Converter= {StaticResource
CheckStateConverter}}" />
</
telerik:ContainerBindingCollection
>
The telerik behaviour when there is a checked child node then the checkbox of the parent will have [-] as it's state and if all of the children checkboxes are checked then parent will be checked likewise.
This is not being reflected when i programmatically check child nodes. I.e. the parent node's checkbox state doesn't reflect it's children checkstates.
Am I doing something wrong here ? and if this is the default behaviour is there an event/method that i can execute or raise so that the parent nodes will update their checkstates based on their children nodes?
Best Regards,
Abdul