Hello
I am trying to save kendo PivotGrid state for future load but I can't find a way to save/load the selected feilds (slices) using the "Fields to Include" menu along side with rows,columns and measures.
Is there any way to get and set selected fields in kendo PivotGrid?
3 Answers, 1 is accepted
0
Preslav
Telerik team
answered on 03 Jul 2018, 12:56 PM
Hello Zand,
If anyone from the community encounters the same, I am pasting my reply from your support ticket on the same topic:
I understand that this functionality might be important for your project, however, for the time being, the PivotGrid does not support persisting its state out of the box. Feel free to upvote this feature request at our feedback portal:
For any one who faced the same problem: I found that filters (and also selected members) could be retrieved and (a little bit tricky) set by filter method of PivotDataSource. By now this method is not documented in the PivotDataSource Api reference(here).
var filters = pivotgrid.dataSource.filter().filters;
pivotgrid.dataSource.filter(filters);
0
Preslav
Telerik team
answered on 12 Jul 2018, 10:28 AM
Hello Mahdi,
Thank you for sharing this solution with the community.
On a side note, about the filter method, the PivotDataSource inherits from kendo.data.DataSource. Thus, all the methods in the regular DataSource are available in the PivotDataSource. Having said that, the documentation about the filter method is available here: