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.

How to display group header without items and add items in the group at run-time?

SfListView allows you to display group headers without items at initially using QueryItemSize event. It is achieved by defining the dummy items like setting empty string to data of underlying collection. Based on the dummy items, set the ItemSize as ‘0’ and Handled the event in the QueryItemSize event and able to add the items at runtime by using the group header.

 

The following code snippet explains how to display group headers initially without items and adding items at runtime by using the group header.

 

XAML

 

C#

 

The following screenshot shows to displaying the empty groups without items and added items at runtime by tapping the add icon in the group header.

Click here to download sample.

Article ID: Published Date: Last Revised Date: Platform: Control:
8491 02/27/2018 02/27/2018 Xamarin.Forms SfListView
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.