This is a migrated thread and some comments may be shown as answers.

Trigger Pivotgrid Actions via API? (Custom Configurator)

4 Answers 61 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Jens
Top achievements
Rank 1
Jens asked on 08 Oct 2014, 07:12 PM
Dear Telerik team,

is it possible to trigger pivotgrid actions via an API?
especially:
- to add dimensions/members or rows or columns (and remove them also)
- to filter dimensions (and to change or reset existing filters)

We need to implement an own custom configurator based on our needs and based on the usability of the
surrounding platform.

Thanks for any suggestions.
Jens

4 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Oct 2014, 09:53 AM
Hello Jens,

Did you have a chance to the PivotDataSource API? It has columns, rows, measures and etc methods. It inherits from DataSource, hence it also has filter method.

Check the documentation and let me know if something is not clear.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jens
Top achievements
Rank 1
answered on 09 Oct 2014, 09:14 PM
Hi Georgi,
yes I know the pivotdatasource.
I allready used it to setup the pivotgrid with inital data and initial structures.
But can you give a short example on how to use it to trigger a change (e.g. add an additional dimension to the rows).
Thanks
Jens
0
Oscar
Top achievements
Rank 1
answered on 13 Oct 2014, 10:15 AM
Hello Jens.

You can use this to add a new column to the grid:
$("#grid").data("kendoPivotGrid").columnsTarget.add("New column name");

To remove:
$("#grid").data("kendoPivotGrid").columnsTarget.remove("New column name");

And the same would apply for new row fields and measure fields by changing columnsTarget to rowsTarget or measuresTarget.
0
Georgi Krustev
Telerik team
answered on 13 Oct 2014, 12:14 PM
Hi Jens,

When I pointed you to the columnsrowsmeasures links, I've meant the methods and not the configuration options. Using the methods you can change the columns, rows, measures and etc. Here is a demo that demonstrates how to add dimension to the column axis.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
PivotGrid
Asked by
Jens
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Jens
Top achievements
Rank 1
Oscar
Top achievements
Rank 1
Share this question
or