From your first post I concluded that you are using data-binding in your application.
"After I have databound my radtreeview
This is why in my previous reply I stated that the built-in tri-state checkbox logic is designed to be used in declaratively defined control, not in data-binding scenarios. This is why I suggested to follow the approach in the referenced article.
By following it, you will be able to bind the IsExpanded
property of every RadTreeViewItem to property exposed by your view model. Furthermore, you will be able to control the
property of the custom CheckBox control in the template of the RadTreeViewItems. Once you have the references of the business items you will be able to save and load them as required. If your business object implements INotifyPropertyChanged interface the UI will be updated accordingly.
The most obvious reason behind not creating all UI elements whenever the RadTreeView control is loaded is the UI virtualization feature
. If it is switched on the RadTreeView will create the items that can be fit in the current viewport of the control, only.
Pavel R. Pavlov
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.