Pdf export and grid aggregate localization

I'm using the source in attachment in a blazor server Net 9 application and I'm not able to create the export in PDF format of the aggregate sum value as reported on the screen

On the screen I see "Totale: ...." but when I export in pdf I see "Sum:...." 

I'm using localization resource file in italian language but Sum seems to be not translated

i'd like to see in the psd the same result I can see on the screen


Attachment: appsettings_f7570700.zip

1 Reply

PS Prathap Senthil Syncfusion Team April 10, 2025 01:47 PM UTC

Hi Walter Martin,

Greetings from Syncfusion,


Based on your reported issue, we would like to clarify that when using aggregates during export, the aggregate type (e.g., "Sum", "Average", etc.) will be displayed by default based on the aggregate type. this is the expected default behavior. If you want to export the FooterTemplate text, you can use the PdfAggregateTemplateInfo event to customize the aggregate footer template value during PDF export in the Grid. Kindly refer to the code snippet and sample below for your reference.

    <SfGrid DataSource="@ArticoliCarrello" AllowPdfExport="true" @ref="Carrello">

    <GridEvents PdfAggregateTemplateInfo="PdfAggregateTemplateInfoHandler" TValue="MagvenditeDTO"></GridEvents

      public void PdfAggregateTemplateInfoHandler(PdfAggregateEventArgs args)

    {

 

        // Customize the text of the aggregate cell

 

        if (args.AggregateType == AggregateTemplateType.Footer)

        {

 

            args.Cell.Value = string.Format("Total: {0:C2}", args.Value);

         

            // Here, you can customize the aggregate group footer value.

        }

 

    }

 

 

 


Reference:
Events in Blazor DataGrid Component | Syncfusion

Regards,
Prathap Senthil


Attachment: appsettings_f7570700_(2)_978861b4.zip

Loader.
Up arrow icon