I'm trying to implement LoadOnDemandCommand in SfTreeGrid.
1st issue - loading roots into the tree not working correctly, only if roots are hardcoded. Without LoadOnDemandCommand works fine.
2nd issue - I'm using async/await to populate children inside LoadOnDemandCommand. Then expanding of nodes not working as I expected
I added code example and video.
Am I something wrong? Thanks for response
Currently, SfTreeGrid doesn’t have support for asynchronous on demand loading. We have considered your requirement of “Provide support for loading items asynchronously in on-demand loading” and logged feature request for the same. We will implement this feature in any of our upcoming release.
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.
Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count.
a modified my example to sync variant. Loading roots still not working, only if roots are hardcoded.
Thanks for response
We are unable to reproduce the issue from our
end. Find the modified tested sample.
If you still facing the reported issue modify the attached sample and share the video illustration of the reported issue. It will be helpful for us to check on it and provide you with a solution at the earliest.
I tried to run attached example but behavior is still same. I expect new roots in tree but there is still only one. Video example attached.
SfTreeGrid allows you to load child items only when they are requested to load on-demand. Initially populate the root Nodes by assigning SfTreeGrid.ItemsSource and then when any node is expanded, child items can be loaded using SfTreeGrid.LoadOnDemandCommand. But in your case, you trying to populate the root Nodes at run time, which is not possible when using the LoadOnDemandCommand in SfTreeGrid. So, the reported scenario is not an issue. This is expected behavior in SfTreeGrid. We have also mentioned in our user guide documentation link,
UG Link: https://help.syncfusion.com/wpf/treegrid/load-on-demand