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

Add PivotFields dynamically

Thread ID:





113771 Oct 8,2013 09:00 AM UTC Oct 22,2013 06:36 AM UTC WPF 1
Tags: PivotGridControl
Alexander Heimonen
Asked On October 8, 2013 09:00 AM UTC


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"

Niranchana R [Syncfusion]
Replied On 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.






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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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