Creating a button to expand rows and columns

6 posts, 0 answers
  1. Rinaldi
    Rinaldi avatar
    2 posts
    Member since:
    Jun 2013

    Posted 06 Nov 2014 Link to this post

    Hi All, 

    I have created a page using pivot table and I want to create a button that can expand all the rows and columns.
    Do anyone here know how to do that?

    Regards,

    Rinaldi
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 10 Nov 2014 Link to this post

    Hello Rinaldi,

    I would suggest you use the PivotDataSource expandColumn/expandRow methods:
    var pivotDataSource = $("#pivotgrid").data("kendoPivotGrid").dataSource;
     
    pivotDataSource.expandColumn(["Category"]);
    pivotDataSource.expandColumn(["Category","SubCategory"]); //second dimension

    pivotDataSource.expandRow(["Division"]);
    pivotDataSource.expandRow(["Division", "Channel"]); //second dimension

    The expand methods expects dimension path. That is why you need to define the full path for the second dimension.

    Give a try and let me know how it goes.

    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. Oaww
    Oaww avatar
    2 posts
    Member since:
    Aug 2012

    Posted 15 Jun 2015 in reply to Georgi Krustev Link to this post

    hello,

            But If need to expand all Column & Rows,it seems to do

           ["Division&B2B","Channel"] and so on...not expand all rows & columns,just the summary row & summary column

  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 17 Jun 2015 Link to this post

    Hi,

    Yes, if you would like to expand the second dimensions of each member of the first dimension, you will need to execute the expandRow/expandColumn with the specific member path.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Bruno Larose
    Bruno Larose avatar
    4 posts
    Member since:
    Jun 2012

    Posted 16 Sep 2015 Link to this post

    Is there any other way to expand all further then expanding path by path?
  7. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 18 Sep 2015 Link to this post

    Hello Bruno,

    I am afraid that currently widget cannot execute batch expand operations to SSAS instance. The only solution is to expand the dimensions level by level:
    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