- Home
- Forum
- Xamarin.Forms
- Dynamic aggregate data in SfListView group headers
Dynamic aggregate data in SfListView group headers
Hello, I'm trying to display some aggregate data in group headers of a SfListView. SfListView documentation page has a good explanation for how to do this with static data. However, I also need to update the headers whenever underlying data changes. For individual list items I have this working with bindings and INotifyPropertyChanged interface. Unfortunately I can't work out how to get the headers to listen to these notifications or otherwise force the headers to update. Anyone have any good ideas how to implement this?
SIGN IN To post a reply.
4 Replies
CS
Chandrasekar Sampathkumar
Syncfusion Team
April 3, 2020 04:10 AM UTC
Hi Matti,
Thank you for using Syncfusion products.
We have checked the reported query “Update GroupHeader whenever underlying data changes” from our end. We are able to replicate the reported issue. We were currently validating the issue and provide you further details on 3rd April 2020. We appreciate your patience until then.
Chandrasekar Sampathkumar
CS
Chandrasekar Sampathkumar
Syncfusion Team
April 3, 2020 06:25 AM UTC
Hi Matti,
Thank you for your patience.
We have checked the reported query “Update GroupHeader whenever underlying data changes” from our end. We suggest you to update the GroupHeader by using the following code snippet,
Code Snippet C#: Update All the Group in the ListView
|
private void Button_Clicked(object sender, EventArgs e)
{
var bindingContext = button.BindingContext as ContactsViewModel;
foreach (var item in bindingContext.contactsinfo)
{
item.ContactNumber = "1000";
}
listView.RefreshListViewItem(-1, -1, true);
} |
We have attached the tested sample for your reference,
Sample Link: SfListViewSample
Please let us know if you need further assistance.
Regards,
Chandrasekar Sampathkumar
MA
Matti
April 6, 2020 06:16 AM UTC
Thanks for the reply. I ended up solving my problem in a slightly different way, but your solution looks like a nice and clean way to handle this.
CS
Chandrasekar Sampathkumar
Syncfusion Team
April 6, 2020 11:33 AM UTC
Hi Matti,
Thank you for the update.
We are glad that our solution meets your requirement. Please let us know if you need any further update. As always we are happy to help you out.
Regards,
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
MA Matti
- Apr 1, 2020 12:28 PM UTC
- Apr 6, 2020 11:33 AM UTC