refreshBtn.element.onclick = function () {
pivotGridObj.engineModule.fieldList = {};
} |
Hi Foulont,
You can refresh “fieldlist” by using below code snippet when refreshing the data.
Code Snippet:
refreshBtn.element.onclick = function () {pivotGridObj.engineModule.fieldList = {};}
Please let us know if you need further assistance on this.
Regards,Sabaridass R
var pivotGridObj = new ej.pivotview.PivotView({
enginePopulating: function(args) {
var report = {};
report[0] = args.dataSource.rows;
report[1] = args.dataSource.columns;
report[2] = args.dataSource.values;
report[3] = args.dataSource.filters;
var pos = 0;
while (pos < 4) {
if (report[pos]) {
for (var cnt = 0; cnt < report[pos].length; cnt++) {
if (Object.keys(args.dataSource.data[0]).indexOf(report[pos][cnt].name) == -1) {
report[pos].splice(cnt, 1);
cnt--;
}
}
}
pos++;
}
}
});
pivotGridObj.appendTo('#PivotView');
|