Trigger Pivotgrid Actions via API? (Custom Configurator)

5 posts, 0 answers
  1. Jens
    Jens avatar
    12 posts
    Member since:
    Aug 2014

    Posted 08 Oct 2014 Link to this post

    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
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 09 Oct 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Jens
    Jens avatar
    12 posts
    Member since:
    Aug 2014

    Posted 09 Oct 2014 in reply to Georgi Krustev Link to this post

    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
  5. Oscar
    Oscar avatar
    173 posts
    Member since:
    Oct 2010

    Posted 13 Oct 2014 in reply to Jens Link to this post

    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.
  6. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 13 Oct 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready