
Barbaros Saglamtimur
Top achievements
Rank 1
Barbaros Saglamtimur
asked on 08 Aug 2012, 08:39 AM
Hi,
How to collapse all rows and columns for the initial load?
TIA.
How to collapse all rows and columns for the initial load?
TIA.
13 Answers, 1 is accepted
0
Hi Barbaros,
Regards,
Eyup
the Telerik team
Could you please elaborate some more on what you are trying to achieve?
Generally, you could hide the grid entirely or partially both on server and client side whenever you want.
Generally, you could hide the grid entirely or partially both on server and client side whenever you want.
Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Barbaros Saglamtimur
Top achievements
Rank 1
answered on 10 Aug 2012, 01:44 PM
Please refer to below link for the screen-shot.
[Screen-Shot]
All rows and Column 2012 (and there will be more like 2013,2014) is collapsed. I would like to do this for the initial load.
TIA
[Screen-Shot]
All rows and Column 2012 (and there will be more like 2013,2014) is collapsed. I would like to do this for the initial load.
TIA
0
Hello Barbaros,
Unfortunately into the CTP version the PivotGrid control does not have any server side API which could be used for achieving the desired functionality. Into the official release version such functionality will be available via server side property. At e meantime to achieve the desired functionality you could try adding the first level grouping items into the CollapsedRowIndexes and CollapsedColumnIndexes collections. I am sending you a simple example which demonstrates that. Please check it out and let me know if it helps you.
Looking forward for your reply.
All the best,
Radoslav
the Telerik team
Unfortunately into the CTP version the PivotGrid control does not have any server side API which could be used for achieving the desired functionality. Into the official release version such functionality will be available via server side property. At e meantime to achieve the desired functionality you could try adding the first level grouping items into the CollapsedRowIndexes and CollapsedColumnIndexes collections. I am sending you a simple example which demonstrates that. Please check it out and let me know if it helps you.
Looking forward for your reply.
All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Ricardo Pinto
Top achievements
Rank 1
answered on 20 Nov 2012, 04:39 PM
Hello!
Is there any change on this subject with the Beta version available with Q3 2012?
I have a similar scenario:
My grid is:
The needdatasource event:
On a toolbar click, I show a pivotgrid, rebind it and use the code provided by Radoslav:
It's not very efficient (as I call ExpensesDataTable twice) but it almost works: the pivotgrid is rendered with all the "Nome" items expanded, but if I click on one item, the pivotgrid is shown with all items collapsed except the one I've clicked (as if they were all collapsed previously).
Any ideas on this issue?
Thanks in advance!
Best regards,
Ricardo.
Is there any change on this subject with the Beta version available with Q3 2012?
I have a similar scenario:
My grid is:
<
telerik:RadPivotGrid
AllowPaging
=
"false"
Width
=
"100%"
ViewStateMode
=
"Inherit"
ID
=
"RadPivotGridPayments"
runat
=
"server"
ColumnHeaderZoneText
=
"ColumnHeaderZone"
ShowDataHeaderZone
=
"False"
ShowRowHeaderZone
=
"False"
ShowColumnHeaderZone
=
"False"
Visible
=
"false"
>
<
ClientSettings
>
<
Scrolling
AllowVerticalScroll
=
"true"
ScrollHeight
=
"300px"
></
Scrolling
>
</
ClientSettings
>
<
Fields
>
<
telerik:PivotGridRowField
DataField
=
"Nome"
ZoneIndex
=
"0"
>
</
telerik:PivotGridRowField
>
<
telerik:PivotGridRowField
DataField
=
"Data"
ZoneIndex
=
"1"
DataFormatString
=
"{0:dd-MM-yyyy}"
>
</
telerik:PivotGridRowField
>
<
telerik:PivotGridColumnField
DataField
=
"DescricaoDespesa"
>
</
telerik:PivotGridColumnField
>
<
telerik:PivotGridAggregateField
DataField
=
"ValorDocumento"
Aggregate
=
"Sum"
DataFormatString
=
"{0:C}"
>
</
telerik:PivotGridAggregateField
>
</
Fields
>
<
SortExpressions
>
<
telerik:PivotGridSortExpression
FieldName
=
"Nome"
SortOrder
=
"Ascending"
></
telerik:PivotGridSortExpression
>
</
SortExpressions
>
</
telerik:RadPivotGrid
>
The needdatasource event:
Protected
Sub
RadPivotGridPayments_NeedDataSource(sender
As
Object
, e
As
PivotGridNeedDataSourceEventArgs)
Handles
RadPivotGridPayments.NeedDataSource
Dim
dt
As
New
DataTable
dt = ExpensesDataTable()
RadPivotGridPayments.DataSource = dt
End
Sub
On a toolbar click, I show a pivotgrid, rebind it and use the code provided by Radoslav:
RadPivotGridPayments.Visible =
True
RadPivotGridPayments.Rebind()
Dim names = (From row In ExpensesDataTable.AsEnumerable()
Select row.Field(Of String)("Nome") Distinct)
For Each item As String In names
RadPivotGridPayments.CollapsedRowIndexes.Add(New Object() {item})
Next
It's not very efficient (as I call ExpensesDataTable twice) but it almost works: the pivotgrid is rendered with all the "Nome" items expanded, but if I click on one item, the pivotgrid is shown with all items collapsed except the one I've clicked (as if they were all collapsed previously).
Any ideas on this issue?
Thanks in advance!
Best regards,
Ricardo.
0
Hello Ricardo,
For the official release (Q1 2013) the RadPivotGrid control will have richer server side API which will allow collapsing all levels or just a single level. However into the beta version this could be achieved only with custom code.
Additionally regarding the described issue:
I tried to reproduce it on my side, but to no avail. Could you please send us a small runnable example where the problem could be reproduced? You could open a formal support ticket from your Telerik account and attach a ZIP file there. Thus we will be able to get more information about your scenario and provide you more to the point answer. Looking forward for your reply.
All the best,
Radoslav
the Telerik team
For the official release (Q1 2013) the RadPivotGrid control will have richer server side API which will allow collapsing all levels or just a single level. However into the beta version this could be achieved only with custom code.
Additionally regarding the described issue:
I tried to reproduce it on my side, but to no avail. Could you please send us a small runnable example where the problem could be reproduced? You could open a formal support ticket from your Telerik account and attach a ZIP file there. Thus we will be able to get more information about your scenario and provide you more to the point answer. Looking forward for your reply.
All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

manish
Top achievements
Rank 1
answered on 08 Feb 2013, 02:02 AM
is this feature being added in the latest release of radpivotgrid.
i tried to find it on the demo version site http://demos.telerik.com/aspnet-ajax-beta/pivotgrid/examples/rangegrouping/defaultcs.aspx
which has the latest beta but could not find any reference to this feature.
please let me know.
thanks
i tried to find it on the demo version site http://demos.telerik.com/aspnet-ajax-beta/pivotgrid/examples/rangegrouping/defaultcs.aspx
which has the latest beta but could not find any reference to this feature.
please let me know.
thanks
0
Hi Manish,
Into the Q1 2013 beta version of our control the RadPivotGrid has two new properties which controls the initial expand/collapse state of the row header and column header tables groups: RowGroupsDefaultExpanded and ColumnGroupsDefaultExpanded. You can download the beta version from your account and test these properties.
If you need further assistance, do not hesitate to contact us again.
Greetings,
Radoslav
the Telerik team
Into the Q1 2013 beta version of our control the RadPivotGrid has two new properties which controls the initial expand/collapse state of the row header and column header tables groups: RowGroupsDefaultExpanded and ColumnGroupsDefaultExpanded. You can download the beta version from your account and test these properties.
If you need further assistance, do not hesitate to contact us again.
Greetings,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

comgiu
Top achievements
Rank 2
answered on 22 Feb 2013, 08:43 AM
hi,
I've 3 zones
I start the grid with rows collapsed
RadPivotGrid1.RowGroupsDefaultExpanded = false;
but I need that when I expand a row, will be expanded only one zone at time
thanks
PS: I need something like this
http://www.mzsolutions.eu/mzPivotGrid-configurator.html
I've 3 zones
I start the grid with rows collapsed
RadPivotGrid1.RowGroupsDefaultExpanded = false;
but I need that when I expand a row, will be expanded only one zone at time
thanks
PS: I need something like this
http://www.mzsolutions.eu/mzPivotGrid-configurator.html
0
Hello Comgiu,
Indeed I verified that the RowGroupsDefaultExpanded=”false” forces the RadPivotGrid to work as you describe. I will forward your requirement to our developers for further consideration.
At a meantime to achieve the desired functionality you could try using the following code snippet:
I hope this helps.
Kind regards,
Radoslav
the Telerik team
Indeed I verified that the RowGroupsDefaultExpanded=”false” forces the RadPivotGrid to work as you describe. I will forward your requirement to our developers for further consideration.
At a meantime to achieve the desired functionality you could try using the following code snippet:
protected
override
void
OnLoad(EventArgs e)
{
base
.OnLoad(e);
if
(!IsPostBack)
{
for
(
int
i = 0; i < RadPivotGrid1.Fields.Count(f => f.ZoneType == PivotGridFieldZoneType.Row && !f.IsHidden); i++)
{
RadPivotGrid1.CollapseAllRowGroups(i);
}
}
}
I hope this helps.
Kind regards,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Barbaros Saglamtimur
Top achievements
Rank 1
answered on 29 Mar 2013, 02:57 PM
Radoslav,
Sorry but I can verify that it's not working. I need same functionality as comgiu. RowGroupsDefaultExpanded = false collapses all rows, which is fine, but when I expand first row, it expands all sub rows too. Our need is expanding only the next level of rows. By the way, if I use the code snippet given by you, it gives me "Type 'Telerik.Web.UI.PivotGrid.Core.NullValue' in Assembly 'Telerik.Web.UI, Version=2013.1.305.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable" error.
Sorry but I can verify that it's not working. I need same functionality as comgiu. RowGroupsDefaultExpanded = false collapses all rows, which is fine, but when I expand first row, it expands all sub rows too. Our need is expanding only the next level of rows. By the way, if I use the code snippet given by you, it gives me "Type 'Telerik.Web.UI.PivotGrid.Core.NullValue' in Assembly 'Telerik.Web.UI, Version=2013.1.305.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable" error.
0
Accepted
Hi Barbaros,
Our developers have fixed the described issue related with the RowGroupsDefaultExpanded set to "false". The fix will be available into the Q1 SP1 version of our controls which will be published tomorrow.
Please excuse us for the temporary inconvenience.
All the best,
Radoslav
the Telerik team
Our developers have fixed the described issue related with the RowGroupsDefaultExpanded set to "false". The fix will be available into the Q1 SP1 version of our controls which will be published tomorrow.
Please excuse us for the temporary inconvenience.
All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Barbaros Saglamtimur
Top achievements
Rank 1
answered on 04 Apr 2013, 09:28 AM
Thanks, I have just upgraded to Q1 SP1 and confirm that it's working as expected.
0

Javier
Top achievements
Rank 1
answered on 10 Jun 2015, 08:45 PM
Hi
RadPivotGrid1.RowGroupsDefaultExpanded = false;
Works nice,
thanks