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

How to display the items count of group in the group header item in SfListView?

Platform: Xamarin.Forms |
Control: SfListView

In SfListView, you can display the items count for each group in the group header item by customizing the GroupHeaderTemplate property and to expand/collapse the groups at runtime you need to define the AllowGroupExpandCollapse as true like following code example. So, when you tap on the group header, then the tapped group gets collapse if the group is in expand state and vice-versa.



To display the total number of items in each group in the group header item, you need to bind the Count property in the GroupHeaderTemplate as like following code example.



Now run the application to render the following output.



Sample Link: ListView_Grouping

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment
Jan 16, 2018

how can I sum a value of the grouped list for that key

James Oliver
Aug 11, 2022

I have data that contains both header rows and data rows. I have a request to have the count only sum the data rows. header data data header data When the above set collapses, the count in the collapsed display is 5 and the request is to have only 3. Not sure if this is possible since five things are being collapsed, but that is what the user requested. I presume I need to NOT bind to the count and have a variable label of my own making instead.


Please sign in to access our KB

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

Up arrow icon

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