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

Empty group in a grouped list view

Thread ID:





130674 May 25,2017 03:44 AM UTC May 27,2017 04:41 AM UTC Xamarin.Forms 1
Tags: SfListView
Gerard De Leon
Asked On May 25, 2017 03:44 AM UTC

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 04:41 AM UTC

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.  
Dinesh Babu Yadav 


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