Pivot Table with Text Column

Hi 

Is there a way to include text field in pivot table. i have comments against data and wanted to show in pivot table along with financials values.


1 Reply

MM Manikandan Murugesan Syncfusion Team August 19, 2021 12:11 PM UTC

Hi Parth Rawal, 

Kindly use “aggregateCellInfo” event to customize pivot table value cells. Please refer to the following code example. 

Code Example: 
[app.component.html]: 
    <ejs-pivotview #pivotview id='PivotView' (aggregateCellInfo)='aggregateCellInfo($event)'> 
    </ejs-pivotview> 
 
[app.component.ts]: 
  aggregateCellInfo(args) { 
    if (args.fieldName === 'Products') { 
      args.value = 
        args.rowCellType === 'grandTotal' 
          ? '' 
          : args.cellSets[0][args.fieldName]; 
    } 
  } 


Meanwhile, we have prepared a sample for your reference. 

 
Please let us know if you have any concerns. 

Regards, 
Manikandan 


Loader.
Up arrow icon