Thanks for contacting Syncfusion Support.
You can set caption to any field even it is not bound in report. It can be achieved by using enginePopulated event. Please refer the following code snippet.
Code Snippet:[React]
export class GroupingBarSample extends SampleBase {
onenginePopulated(args) {
if (isInitial) {
isInitial = false;
Object.keys(this.pivotObj.engineModule.fieldList).forEach((key, index) => {
if (key === 'Quarter') {
this.pivotObj.engineModule.fieldList[key].caption = 'Qtr';
}
});
}
}
render() {
return (<div className='control-pane'>
<div className='col-lg-9 control-section' id='pivot-table-section' style={{ overflow: 'initial' }}>
<PivotViewComponent id='PivotView' ref={(scope) => { this.pivotObj = scope; }} dataSourceSettings={dataSourceSettings} width={'100%'} height={'450'} showGroupingBar={true} showFieldList={true} gridSettings={{ columnWidth: 140 }} enginePopulated={this.onenginePopulated.bind(this)}>
<Inject services={[GroupingBar, FieldList]} />
</PivotViewComponent>
</div>
</div>);
}
} |
Meanwhile, we prepared a sample for your reference.
Please let us know, if you need further assistance on this.
Regards,
Sivamathi Natarajan