Hello colleagues!
I am developing my own pivot table extension. Faced the problem of getting complete data.
If I create a regular table, then I use the following construction:
var qTotalData = [];
var totalrow = this.backendApi.getRowCount(),
columns = hc.qDimensionInfo.length + hc.qMeasureInfo.length,
pageheight = Math.floor(10000 / columns);
var lastrow = 0, me = this;
this.backendApi.eachDataRow( function ( rownum, row ) {
lastrow = rownum;
qTotalData.push(row)
});
if (totalrow > lastrow + 1) {
var requestPage = [{
qTop: lastrow + 1,
qLeft: 0,
qWidth: columns,
qHeight: pageheight
}];
this.backendApi.getPivotData( requestPage ).then( function ( dataPages ) {
me.paint( $element, layout );
});
}
But this method does not work with pivot tables.
I found that there is a getPivotData method, but I don't know how to use it to get all the data in the pivot table.
The eachDataRow method does not return anything (does not work as I expected) and I cannot redraw the extension, hence the lastrow does not increase.
Any ideas on how to get complete data on a pivot table?
Thank you in advance for your help
With respect George.