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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Does not work Sfexpander expand action with SfListview

Thread ID:

Created:

Updated:

Platform:

Replies:

147461 Sep 11,2019 11:31 AM UTC Sep 3,2020 06:29 AM UTC Xamarin.Forms 8
loading
Tags: SfExpander
Mahmut Nedim
Asked On September 11, 2019 11:32 AM UTC

Hi i am using SfExpander with SfListview like attached files. If i use only expander, the expand action is working. But if i use together sflistview, the expand action is not working. I cannot see the contents.


Attachment: sflistview_7b11ea1.rar

Sangeetha Raju [Syncfusion]
Replied On September 13, 2019 11:28 AM UTC

Hi Mahmut, 
 
Thank you for contacting Syncfusion support. 
 
We would like to inform you that reported issue occurs due to the height measure doesn’t happen at runtime. So, you have to set the AutoFitMode property as ‘DynamicHeight to the SfListView as like below code snippet. The reported issue will be resolved.  
 
<sflistview:SfListView ItemsSource="{Binding Info}" 
                                   AutoFitMode="DynamicHeight"> 
 
Also, refer the documentation for further information. 
 
 
Please let us know if you require any further assistance. 
 
Regards, 
Sangeetha Raju. 


Mahmut Nedim
Replied On September 16, 2019 12:49 PM UTC

Thank you for your answer, i have solved. but i have another problem. I have send code blog and two picture. when the all rows Isexpand are close the lists Heightrequest is fine like "pic1.png", but if i expand any row the contents layout heightrequest is so long like "pic2.png". how can i solved?


Attachment: expanderAndListview_a30f8179.rar

Sangeetha Raju [Syncfusion]
Replied On September 17, 2019 11:38 AM UTC

Hi Mahmut, 
 
We would like to inform you that the reported issue gets replicated at our end. We have to find the root cause of this issue hence we will update you with further details on September 18, 2019. 
 
We appreciate your patience until then. 
 
Regards, 
Sangeetha Raju. 


Sangeetha Raju [Syncfusion]
Replied On September 18, 2019 01:53 PM UTC

Hi Mahmut, 
 
We would like to let you know that you can overcome the reported issue by extending the inner ListView and set the TotalExtent for the Height of the ListView as like below code snippet. 
 
public class ExtendedListView : SfListView 
{ 
   VisualContainer container; 
   public ExtendedListView() 
   { 
      container = this.GetVisualContainer(); 
      container.PropertyChanged += Container_PropertyChanged; 
   } 
 
   private void Container_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) 
   { 
      if (e.PropertyName == nameof(Height)) 
      { 
         var extent = (double)container.GetType().GetRuntimeProperties().FirstOrDefault(container => container.Name == "TotalExtent").GetValue(container); 
         this.HeightRequest = extent; 
      } 
   } 
} 
 
We have attached the tested sample for your reference. Please find the sample from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Sangeetha Raju. 


Mahmut Nedim
Replied On September 19, 2019 08:30 AM UTC

thank u very much. I have solved

Sangeetha Raju [Syncfusion]
Replied On September 20, 2019 06:10 AM UTC

Hi Mahmut,  
  
Thank you for the update. Please let us know if you require any further assistance.  
  
Regards,  
Sangeetha Raju.  


Andrea
Replied On September 2, 2020 11:03 PM UTC

Hi, I tried this solution to make the list with the right height, bust still not work. Should I just need to 
public class ExtendedListView : SfListView    { [...ecc...] }
at the end of the file where i place that list?

Lakshmi Natarajan [Syncfusion]
Replied On September 3, 2020 06:29 AM UTC

Hi Andrea, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Expander with nested ListView” from our end. We would like to inform you that you need to update the inner ListView’s HeightRequest to update the ListView based on items height 
 
Please refer to the following documentation regarding working with nested listview from the below link, 
 
Also, we have attached the tested sample in the following link, 
 
Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 


CONFIRMATION

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