We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Loading roots when LoadOnDemandCommand is used. And Async loading issue

Hi,
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

Ondrej Rada


Attachment: TreeGridExample_c1eb24d9.zip

5 Replies

SJ Sathiyathanam Jeyakumar Syncfusion Team November 15, 2022 10:34 AM

Currently, SfTreeGrid doesn’t have support for asynchronous on demand loadingWe 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.

Feedback link: https://www.syncfusion.com/feedback/34559/provide-support-for-loading-items-asynchronously-in-ondemandloading

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.



ON Ondrej November 19, 2022 06:08 PM

Hi, 
a modified my example to sync variant. Loading roots still not working, only if roots are hardcoded.

Thanks for response

Ondrej Rada



VD Vasanthkumar Durairaj Syncfusion Team November 21, 2022 10:43 AM

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.



Attachment: TreeGridExample_e3555e9a.zip


ON Ondrej November 27, 2022 02:52 PM

Hi,
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. 

Thanks 

Ondrej Rada


Attachment: loadroots_62386467.zip


VS Vijayarasan Sivanandham Syncfusion Team November 30, 2022 02:17 PM

Ondrej,

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


Loader.
Live Chat Icon For mobile
Up arrow icon