var pivotGridObj = new ej.pivotview.PivotView({
dataSource: {
data: data,
expandAll: false,
allowLabelFilter: true,
allowValueFilter: true,
enableSorting: true,
values: [{ name: 'DrAmount', caption: 'DR' }, { name: 'CrAmount', caption: 'CR' }, { name: 'Balance', caption: 'Balance', type: 'RunningTotals' }],
rows: [{ name: 'SubType', caption: 'SubType' }, { name: 'ExchangeCode', caption: 'ExchangeCode' }, { name: 'd_ACCPostingDate', showSubTotals: true, caption: 'Date' }, { name: 'n_JournalNo', caption: 'JNO.' }, { name: 'AccountName', caption: 'Particulars' }],
calculatedFieldSettings: [{ name: 'Balance', formula: '"Sum(CrAmount)"-"Sum(DrAmount)"' }],
height: 800,
enableVirtualization: true,
gridSettings: {
rowHeight: 20,
allowResizing: false,
columnRender: function (args) {
for (var i = 0; i < args.columns.length; i++) {
if (args.columns[i].headerText != undefined && args.columns[i].headerText.indexOf("DR") > 0)
args.columns[i].width = 120; // You can customize the width of specific column here.
}
}
}
});
Here I am not using Columns field so i want to set a width to value fields.
args.columns[i].width = 120;
this is not working for me how should i achieve these in values field..
Thanks in Advance...