When I get down to the last level, I want to set the items to have no children, thus eliminating the expander. I've tried this a number of ways and have been unsuccessful.
Any pointers would be greatly appreciated.
Thanks,
Tony
6 Answers, 1 is accepted
try setting the IsLoadOnDemandEnabled to false to the items that don't have children. This will eliminate the expander icon.
Greetings,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Any other thoughts?
This looks like a bug. Can you send us the project where we can investigate the issue?
All the best,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am developing both for Silverlight and WPF. In WPF it works fine.
In Silverlight I use containerbinding to link to my ViewModel.
<
telerik:ContainerBindingCollection
>
<
telerik:ContainerBinding
PropertyName
=
"IsLoadOnDemandEnabled"
Binding
=
"{Binding IsLoadOnDemandEnabled, Mode=TwoWay}"
/>
<
telerik:ContainerBinding
PropertyName
=
"IsSelected"
Binding
=
"{Binding IsSelected, Mode=TwoWay}"
/>
<
telerik:ContainerBinding
PropertyName
=
"IsExpanded"
Binding
=
"{Binding IsExpanded, Mode=TwoWay}"
/>
</
telerik:ContainerBindingCollection
>
However, the expander item is still there.
When load is triggered and I debug into my ViewModel, I can see that IsLoadOnDemandEnabled is false.
Setting the IsLoadOnDemand enabled to true guarantees only that when a RadTreeVewiItem is being expanded, the LoadOnDemand events of the RadTreeView and the RadTreeViewItem will fire. Setting this property to false guarantees that these events will not fire. When you want to remove/change the expander ToggleButton in the RadTreeViewItem , you have to play with the ExpanderStyle property. Please check out this blog post which is a very good starting point. Do not hesitate to ask if you need further assistance.
Best wishes,Petar Mladenov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>