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

Creating a button to expand rows and columns

7 Answers 450 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Rinaldi
Top achievements
Rank 2
Rinaldi asked on 07 Nov 2014, 04:11 AM
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

7 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 10 Nov 2014, 11:45 AM
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!
 
0
Oaww
Top achievements
Rank 1
answered on 15 Jun 2015, 01:31 PM

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

0
Georgi Krustev
Telerik team
answered on 17 Jun 2015, 09:10 AM
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!
 
0
Bruno Larose
Top achievements
Rank 2
answered on 16 Sep 2015, 05:43 PM
Is there any other way to expand all further then expanding path by path?
0
Georgi Krustev
Telerik team
answered on 18 Sep 2015, 09:47 AM
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!
 
0
Webster Velasco
Top achievements
Rank 2
answered on 03 May 2017, 01:49 PM

is there a way to get all possible path with current version in order to expand everything?

like this http://orbjs.net/

0
Konstantin Dikov
Telerik team
answered on 05 May 2017, 08:31 AM
Hi,

You could try to retrieve the paths from the expand/collapse icons through the data-path attribute:
<span class="k-icon k-i-arrow-e" data-path="["[Geography].[City].[All Geographies]"]"></span>

Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PivotGrid
Asked by
Rinaldi
Top achievements
Rank 2
Answers by
Georgi Krustev
Telerik team
Oaww
Top achievements
Rank 1
Bruno Larose
Top achievements
Rank 2
Webster Velasco
Top achievements
Rank 2
Konstantin Dikov
Telerik team
Share this question
or