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

Empty group in a grouped list view

Thread ID:

Created:

Updated:

Platform:

Replies:

130674 May 24,2017 11:44 PM May 27,2017 12:41 AM Xamarin.Forms 1
loading
Tags: SfListView
Gerard De Leon
Asked On May 24, 2017 11:44 PM

Is it possible for the SfListView to have a group that does not have any items on it? I know that the grouping of the items in the list is resolved based on a property name but I was wondering if there was a way to have a group but with no items on it.

Dinesh Babu Yadav [Syncfusion]
Replied On May 27, 2017 12:41 AM

Hi Gerard,  
   
Thank you for using Syncfusion products.  
   
In SfListView, we have grouped the items based on the underlying data bind to ItemsSource property and this is the actual behavior of SfListView. So in order to achieve your requirement “Displaying group headers only without items”, we have an workaround in the sample level by handing the QueryItemSize event and with AutoFitMode as “Height”. By defining the ItemsSize as “0” and handling the event as e.Handled as “True” for the empty items, the group header is only visible. And by customizing the GroupHeaderTemplate, you can add the items by tapping on the customized group header template and after the item is added based on the content the size for the item is set. For your reference, we have attached the sample and you can download the same from the below link.  
   
  
Please let us know if you require further assistance.  
   
Regards,  
Dinesh Babu Yadav 
 


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.

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.

;