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

Add PivotFields dynamically


I am wondering if it is possible to add PivotFields dynamically to a PivotGrid without using CodeBehind. Either from a dynamic expando object or from a list of dynamic properties.

My current implementation does like the following in CodeBehind:

if (HasDimensionType(debitRows, DimensionType.employee_id))
    this.PivotGrid.PivotFields.Add(new PivotItem
        FieldMappingName = "EmployeeIdDimensionText",
        FieldHeader = "Anställningsnummer",
        TotalHeader = "Total"

1 Reply

NR Niranchana R Syncfusion Team October 22, 2013 06:36 AM UTC

Hi Alexander,


We would like to inform you that we have created a simple sample to add Pivot Fields dynamically to a PivotGrid from a list containing dynamic properties. Please download the sample from the following link.


Sample link:



In the above sample, we used a separate button which adds Pivot Field dynamically to PivotGrid Control.


Please let us know if any queries.





Live Chat Icon For mobile
Up arrow icon