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

PivotViewFormatSetting and PivotViewCalculatedFieldSetting with ExpandoObject does not work

Hi Syncfusion Team,

attached sample project does not work. What am I doing wrong?

Can you help me please?

Thank's in advance


Attachment: Syncfusion_Pivot_4e8baa19.zip

2 Replies 1 reply marked as answer

AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team November 22, 2022 09:28 AM

Hi Gisela,

The reported issue occurs due to the PivotViewFormatSettings and PivotViewCalculatedField are defined outside of the PivotViewDataSourceSettings tag, while they should be used inside of that tag instead. Please refer the code snippet below.

Code Example:

<SfPivotView TValue="ExpandoObject" Height="560" Width="100%" AllowCalculatedField=true>

    <PivotViewDataSourceSettings DataSource="@Orders">


           <PivotViewFormatSetting Name="Freight" Format="N0" UseGrouping="false" ></PivotViewFormatSetting>

               <PivotViewFormatSetting Name="FreightAdd" Format="N0" UseGrouping="false"></PivotViewFormatSetting>



            <PivotViewCalculatedFieldSetting Name="FreightAdd" Formula="@f_add"></PivotViewCalculatedFieldSetting>




Meanwhile, we have modified your sample for your reference.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion_Pivot-630089751

Please see the below UG document for more information on the PivotViewFormatSettings and PivotViewCalculatedField property.

PivotViewFormatSettings: https://blazor.syncfusion.com/documentation/pivot-table/number-formatting

PivotViewCalculatedField: https://blazor.syncfusion.com/documentation/pivot-table/calculated-field

Please let us know if you have any concerns.


Angelin Faith Sheeba

Marked as answer

GI gisela November 28, 2022 06:52 AM

Thank you

Live Chat Icon For mobile
Up arrow icon