Column header in Pivots

2 posts, 0 answers
  1. Srinivas
    Srinivas avatar
    9 posts
    Member since:
    Sep 2014

    Posted 27 May 2015 Link to this post

    I am able to display row headers in pivots but is there a way to display column headers through Pivots
  2. Polya
    Admin
    Polya avatar
    199 posts

    Posted 29 May 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top