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

Summary row disappear after reset model

Thread ID:

Created:

Updated:

Platform:

Replies:

124953 Jul 11,2016 07:17 AM UTC Jul 12,2016 07:25 PM UTC Xamarin.Forms 2
loading
Tags: SfDataGrid
Mohamad Razif Hussin
Asked On July 11, 2016 07:17 AM UTC


If i disabled the OnAppear, the summary row is there.
Can you please show me the correct method to reset and reload the data to datagrid, so the summary row won't be disappear?
Thank you in advance.

This is the code for grouping & summary:
 
_dataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription()
{
ColumnName = "EventID"
});

GridSummaryColumn summaryColumn = new GridSummaryColumn();
summaryColumn.Name = "CaptionSummary";
summaryColumn.MappingName = "Money";
summaryColumn.Format = "{Sum:c}";
summaryColumn.SummaryType = Syncfusion.Data.SummaryType.DoubleAggregate;

GridSummaryRow summaryRow = new GridSummaryRow();
summaryRow.Title = "Total: {CaptionSummary}";
summaryRow.ShowSummaryInRow = true;
summaryRow.SummaryColumns.Add(summaryColumn);

_dataGrid.CaptionSummaryRow = summaryRow;



This is my reset binding method(though i don't know if this is the right code for it ):

void Handle_Appearing(object sender, System.EventArgs e)
{
model = new RepActivitiesRepository(_eventId);
_dataGrid.ItemsSource = model.Activities;
}

Mohamad Razif Hussin
Replied On July 12, 2016 01:30 PM UTC

Nevermind, I just use stack layout and add an external custom summary, solved..

Vimal Prabhu Manohkaran [Syncfusion]
Replied On July 12, 2016 07:25 PM UTC

Hi Mohamad,

Thanks for contacting Syncfusion Support.

Regarding your query to show Summary Row when resetting or changing the itemssource of the SfDataGrid, it is by default the behaviour of SfDataGrid where we clear all the collections when changing the itemssource . This is because we cannot be sure that the next itemssource will also contain the same column name that is present in the current GroupColumnDescription collection. Hence grouping and sorting will be removed when changing itemssource. If you want to show the summary for the new data, we suggest you add the column into the GroupColumnDescription collection again when you are changing the itemssource.

Please revert us if you may have any queries

Regards,
Vimal Prabhu

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.

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

;