Open ograndebe opened 8 years ago
Save and restore the current state is a great feature. I think that state changes can be notified by an event or requested via API. So we can restore it anytime later. Its not supported by default?
Basically you have to save all the fields and applied filters manually. 1) Use these functions to retrieve fields and their positions:
myPivot.pgrid.config.dataFields myPivot.pgrid.config.columnFields myPivot.pgrid.config.rowFields
2) Get filter for each field using:
myPivot.pgrid.getFieldFilter()
To restore fields and filters use you have to know current positions of each field (repeat previous steps to get current pivot state) then you should:
3) Restore fields positions with
myPivot.moveField()
4) Restore filters with
myPivot.applyFilter()
I tried to store a config object and change the configuration via Javascript. But, after first config refresh, the pivot table not work properly.
There's an example:
![Uploading problema_orb.PNG…]() this problem occurs when I drag the fields after the first refresh