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

7 Replies

SJ Sathiyathanam Jeyakumar Syncfusion Team November 15, 2022 03:34 PM UTC

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 11:08 PM UTC

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 03:43 PM UTC

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 07:52 PM UTC

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 07:17 PM UTC

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



ON Ondrej December 16, 2022 08:15 PM UTC

Hi,
I do not understand why it is not possible and why it is expected behavior. In my case I need to reload root nodes when UI component (SfTreeGrid) is already loaded. If data was changed and refresh is necessery, my only option is to dispose sftreegrid and reload full component again. It is very sad.


Ondrej Rada


VD Vasanthkumar Durairaj Syncfusion Team December 19, 2022 03:53 PM UTC

Hi Ondrej,

LoadOnDemandCommand used to load child items only to the rootNodes in the SfTreeGrid upon request.


We need to populate the rootNodes initially, and then when any node is expanded, child items can be loaded using SfTreeGrid.LoadOnDemandCommand.


For more information, find the UG,
https://help.syncfusion.com/wpf/treegrid/load-on-demand#load-on-demand-using-command


Loader.
Live Chat Icon For mobile
Up arrow icon