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

Add PivotFields dynamically

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi.

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:

http://www.syncfusion.com/downloads/support/directtrac/general/PivotFields847233038.zip

 

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

 

Please let us know if any queries.

 

Regards,

Niranchana



PivotFields_bfaeaa1f.zip

CONFIRMATION

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.

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

;