This question is locked. New answers and comments are not allowed.
Hi.
Using RadControls_for_Silverlight_4_2010_2_0812, I discovered that if I dynamically set
Then LoadOnDemand will get called twice.
Take the example here:
http://www.telerik.com/community/forums/silverlight/treeview/treeview-with-loadondemand-and-checkboxes-does-not-remember-checkbox-state.aspx
And change:
1. MainPage.xaml
a. remove IsLoadOnDemandEnabled="True"
b. remove LoadOnDemand="SampleTreeView_LoadOnDemand"
c. add ItemPrepared="SampleTreeView_ItemPrepared"
2. MainPage.xaml.cs
Set a breakpoint in SampleTreeView_LoadOnDemand and you will see it get called twice when you expand "Team 1 \ John from Team 1" for example.
It will not get called twice if you just expand "Team 1".
Is this a bug?
Thank you.
Using RadControls_for_Silverlight_4_2010_2_0812, I discovered that if I dynamically set
item.IsLoadOnDemandEnabled = true;
item.LoadOnDemand += SampleTreeView_LoadOnDemand;
Then LoadOnDemand will get called twice.
Take the example here:
http://www.telerik.com/community/forums/silverlight/treeview/treeview-with-loadondemand-and-checkboxes-does-not-remember-checkbox-state.aspx
And change:
1. MainPage.xaml
a. remove IsLoadOnDemandEnabled="True"
b. remove LoadOnDemand="SampleTreeView_LoadOnDemand"
c. add ItemPrepared="SampleTreeView_ItemPrepared"
2. MainPage.xaml.cs
private void SampleTreeView_ItemPrepared(object sender, RadTreeViewItemPreparedEventArgs e)
{
RadTreeViewItem item = e.PreparedItem;
item.IsLoadOnDemandEnabled = true;
item.LoadOnDemand += SampleTreeView_LoadOnDemand;
}
Set a breakpoint in SampleTreeView_LoadOnDemand and you will see it get called twice when you expand "Team 1 \ John from Team 1" for example.
It will not get called twice if you just expand "Team 1".
Is this a bug?
Thank you.