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

problem of binding dynamically IsLoadingOnDemandEnabled property

2 Answers 45 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
alino
Top achievements
Rank 1
alino asked on 15 Sep 2010, 08:29 PM

Hi everybody,

I have a problem when i try to bind a IsLoadingOnDemandEnabled property  with boolean propery from business object in MVVM Pattern.
I tried this:
// for setting the property in the UserControl.Resources
 

 

<Style x:Key="LoadingStyle" TargetType="telerik:RadTreeViewItem"
<Setter Property="IsLoadOnDemandEnabled" Value="{Binding Path=BoolProp}"/> 
</Style>

 

 

 

 Here "BoolProb" is my boolean property of business object
In The RadTreeView Tag, I did such:

 

<telerik:RadTreeView x:Name="radTreeView" Margin="8" IsLineEnabled="True" ItemContainerStyle="{StaticResource LoadingStyle}"  
IsDragDropEnabled="True" AllowDrop="True" IsDragTooltipEnabled="True" 
ItemTemplate="{StaticResource EntityTemplate}" ItemsSource="{Binding Children}" 
IsDragPreviewEnabled="True" IsExpandOnDblClickEnabled="True" IsExpandOnSingleClickEnabled="False"/>

My business objects I bound to the TreeView are in The list Named Children. Can U give me please any idea helping me to solve the binding problem ?

Thank U for your Help

 

 

 

 

 

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 17 Sep 2010, 08:09 AM
Hello alino,

 The reason this is not working is that Silverlight doesn't support "in Style bindings". This is annoying limitation, but we we have our own API to fix this. You should use our ContainerBindings. Read the full story.
Hope this will help you.

All the best,
Miro Miroslavov
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
alino
Top achievements
Rank 1
answered on 17 Sep 2010, 06:53 PM
Hi Miroslavov,

thank you so much for your precious Help, now my property binding is working.

Best regards,

Alino
Tags
TreeView
Asked by
alino
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
alino
Top achievements
Rank 1
Share this question
or