This is a migrated thread and some comments may be shown as answers.

Column header in Pivots

1 Answer 91 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 27 May 2015, 09:46 AM
I am able to display row headers in pivots but is there a way to display column headers through Pivots

1 Answer, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 29 May 2015, 12:45 PM
Hello Srinivas,

Have you added a group description in your RadPivotGrid's DataProvider ColumnGroupDescriptions?
If you are using the LocalDataSourceProvider you can add ColumnGroupDescriptions in xaml:
<pivot:LocalDataSourceProvider x:Key="dataProvider">
    <pivot:LocalDataSourceProvider.ItemsSource>
        <data:SampleOrders />
    </pivot:LocalDataSourceProvider.ItemsSource>
    <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
        <pivot:DoubleGroupDescription PropertyName="Price" />
    </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>>
</pivot:LocalDataSourceProvider>

or in code:
LocalDataSourceProvider localDataProvider = new LocalDataSourceProvider();
localDataProvider.ItemsSource = new SampleOrders();
DoubleGroupDescription doubleGroupDescription = new DoubleGroupDescription();
doubleGroupDescription.PropertyName = "Price";
localDataProvider.ColumnGroupDescriptions.Add(doubleGroupDescription);

You can find more information on how to populate a RadPivotGrid with data in this help article.
Also you can take a look at our QSF examples that show RadPivotGrid using different DataProviders.

Hope this helps.

Regards,
Polya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
PivotGrid
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Polya
Telerik team
Share this question
or