Hi,
I have spent days trying to get Xamarin Forms RadTreeView LoadOnDemand to work properly for a UWP app that is referencing the Xamarin Forms app. I can debug break the code at the load command and see that the data is loading properly into the context and the treeview icon indicates that it is expanded, but the new sub items will not show up. I have tried with datatemplate, without template, with various types of collections, manually calling OnPropertyChanged, using the ItemTapped event instead instead of LoadOnDemand, all with the same results.
I believe it is a bug because when I load all the data initially, it will show up properly in the tree. However, I have found no way to initialize the tree in a collapsed state (even if I call CollapseAll which doesn't do anything). It's as if the treeview is never getting refreshed if the ItemsSource data changes after the page loads.
Do you have a simple working UWP example with LoadOnDemand? The GitHub QSF projects have so many compilation errors that I can't get them to work.
I'm using Telerik.UI.for.Xamarin (2018.3.1122.3)
Thanks,
Ian
private
void
LoadOnDemandExecute(
object
p)
{
var context = (TreeViewLoadOnDemandCommandContext)p;
var platform = context.Item
as
TreePlatform;
if
(platform !=
null
)
{
platform.Groups =
new
List<TreeGroup>();
platform.Groups.Add(
new
TreeGroup() { Name =
"test"
});
context.Finish();
}
}