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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

LoadOnDemandCommand and ChildPropertyName on same SfTreeView

Thread ID:





142000 Jan 14,2019 01:53 PM UTC Jan 21,2019 05:41 AM UTC Xamarin.Forms 3
Tags: SfTreeView
Asked On January 14, 2019 01:53 PM UTC


When I use LoadOnDemandCommand and ChildPropertyName on same SfTreeView, the initial ChildNodes are not loaded.
Is there any way to force some ChildNodes to be displayed when opening the page?

To better explain, I've changed the On Demand Load tab in your samples and attached in this post.

Best regards,

Marcel Souza
Pds Informática

Attachment: TreeView_b7597a4c.zip

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 17, 2019 03:54 PM UTC

Hi Marcel,  
Thank you for using Syncfusion Products.  
We have checked your query “ChildNodes are not loaded when used LoadOnDemandCommand and ChildPropertyName” from our side. When you set both LoadOnDemandCommand and ChildPropertyName for same SfTreeView, ChildNodes for particular item you needed to load initially while loaded will be loaded. You have to return false in the CanExecute method of LoadOnDemandCommand, for the node to which you have to load ChildNodes initially when loaded.  
To display some ChildNodes when opening the page, you need to set AutoExpandMode property to either AllNodesExpanded or RootNodesExpanded.  
You can download the sample from following location.   
Please let us know, if you have any query. 
Subburaj Pandian V  

Replied On January 19, 2019 11:27 AM UTC


Thank you for your feedback.

In the CanExecute method, I was testing the amount of ChildNodes and  in the first reading was returning true. Now I fixed this and all works great.

Jayaleshwari N [Syncfusion]
Replied On January 21, 2019 05:41 AM UTC

Hi Marcel, 
Thanks for the update. Please get in touch if you would require further assistance. 

Jayaleshwari N. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon