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
close icon

Deserialization summary with custom aggregation


I have a problem deserializing an SfDataGrid.

I have summarized columns in groupings that use custom aggregators. The problem occurs when from the first time I use deserialization on a datagrid, aggregation stops working, but only custom ones.

How should I proceed?

CustomAggregate="{StaticResource stringAggregator}"

Before deserializing:

After deserializing:

Attachment: StringAggregate_c786f9fd.rar

2 Replies

TR Thiago Renan Gomes September 2, 2019 08:16 PM UTC

Resolved by ignoring the summarized fields.

var serializationOptions = new SerializationOptions()
                SerializeCaptionSummary = false,
                SerializeGroupSummaries = false,
                SerializeTableSummaries = false,
                SerializeDetailsViewDefinition = false,
                SerializeUnBoundRows = false,
                SerializeStackedHeaders = false

var deserializationOptions = new DeserializationOptions()
                DeserializeGroupSummaries = false,
                DeserializeCaptionSummary = false,
                DeserializeTableSummaries = false,
                DeserializeDetailsViewDefinition = false,
                DeserializeUnBoundRows = false,
                DeserializeStackedHeaders = false

FP Farjana Parveen Ayubb Syncfusion Team September 3, 2019 10:38 AM UTC

Hi Thiago, 
Thanks for the update. 
We are glad to know that the reported problem has been resolved at your end. By default custom summaries is not support the Serialization and Deserialization. So when you Serialize and Deserialize the SfDataGrid, you have to disable the Serialization and Deserialization option for that corresponding summaries. 
Please let us know if you have any further queries on this. We are happy to help you. 
Farjana Parveen A 

Live Chat Icon For mobile
Up arrow icon