Configuring the PivotGrid to combine certain columns, and leave others as is

3 posts, 0 answers
  1. Francois
    Francois avatar
    6 posts
    Member since:
    Nov 2013

    Posted 16 May 2014 Link to this post

    Hi Telerik,

    I'm trying to achive something like in the PivotGrid_ExcelBase image. There you can see the years (2012, 2013) columns with both personen and bedrag columns underneath.

    Currently I tried to achieve that with the following code:

    02. <telerik:PivotGridRowField DataField="SoortIndicatie" UniqueName="SoortIndicatieColumn" Caption="Soort Indicatie" >
    03. </telerik:PivotGridRowField>
    04. <telerik:PivotGridRowField DataField="SoortVerzilverd" UniqueName="SoortVerzilverdColumn" Caption="Soort Verzilverd">
    05. </telerik:PivotGridRowField>
    07. <telerik:PivotGridColumnField DataField="Jaar" UniqueName="JaarColumn" Caption="Jaar">
    08. </telerik:PivotGridColumnField>
    09. <telerik:PivotGridColumnField DataField="Personen" UniqueName="PersonenColumn" Caption="Personen">
    10. </telerik:PivotGridColumnField>
    11. <telerik:PivotGridColumnField DataField="Bedrag" UniqueName="BedragColumn" Caption="Bedrag">
    12. </telerik:PivotGridColumnField>

    This shows me a grid as depicted in the PivotGrid_Rendered image. The person and budget columns are also grouped, that's not what I want.
    How can I configure this?

    Can you tell me how to do so? 

    Best regards,
  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 21 May 2014 Link to this post


    I would suggest you to review the online demo below where the years and the ship country fields represents the year and the personen/bedgar fields ion your case.

    You could use the configuration panel to modify the columns and the row fields so that you will be able to see what is the exact configuration needed ion your case.

    Maria Ilieva

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Francois
    Francois avatar
    6 posts
    Member since:
    Nov 2013

    Posted 22 May 2014 Link to this post

    It should be done like follows:
       <telerik:PivotGridRowField DataField="SoortIndicatie" UniqueName="SoortIndicatieColumn" Caption="Soort Indicatie">
       <telerik:PivotGridRowField DataField="SoortVerzilverd" UniqueName="SoortVerzilverdColumn" Caption="Soort Verzilverd">
       <telerik:PivotGridColumnField DataField="Jaar" UniqueName="JaarColumn" Caption="Jaar">
        <telerik:PivotGridAggregateField DataField="Personen" Aggregate="Sum" UniqueName="PersonenColumn" Caption="Personen">                   
        <telerik:PivotGridAggregateField DataField="Bedrag" Aggregate="Sum" UniqueName="BedragColumn" Caption="Bedrag" DataFormatString="{0:C}">

    Please note that you should NOT use AggregatesLevel="0" in the properties of the pivotgrid. this will present you witha null reference exception.

Back to Top