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

TreeView with LoadOnDemand and checkboxes does not remember checkbox state

1 Answer 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 13 Aug 2010, 10:31 PM
Hi.

I took the example from .\Demos\Examples\TreeView\LoadOnDemand and just set IsOptionElementsEnabled="True" on the RadTreeView.

Then when I run the project, checkmark Beverages, and then expand it, the checkmark on Beverages disappears.

Is this a bug?

Any ideas to work-around this?

Thank you.

RadControls_for_Silverlight_4_2010_2_0812

1 Answer, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 18 Aug 2010, 05:01 PM
Hi Mike,

Yes this is a bug. i gave you 1000 points for your efforts.

The problem comes from the fact that children elements in the view model are stored inside a ObservableCollection. If you change the type to be List for example and make the necessary changes the bug should not be introduced.

However I'm attaching a project with the work around that does not depend of whether ObservableCollection or List is used. The solution is based on data binding. This way the value is preserved during expand. Note I'm implementing the INotifyPropertyChanged interface in order to employ two way binding.

All the best,
Hristo Milyakov
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
Mike
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or