Articles in this section
Category / Section

How to expand all the members in the JavaScript PivotGrid?

1 min read

This KB illustrates that how to expand all the members in the JavaScript PivotGrid.

Solution:

By using DrillState enumeration, you can expand all the members in the PivotGrid. You can refer to the following code example.

C#

OlapReport olapReport = new OlapReport() { Name = "Default Report" };
olapReport.CurrentCubeName = "Adventure Works";
MeasureElements measureElement = new MeasureElements();
measureElement.Elements.Add(new MeasureElement { UniqueName = "[Measures].[Customer Count]" });
DimensionElement dimensionElementRow = new DimensionElement();
dimensionElementRow.Name = "Date";
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
dimensionElementRow.DrillState = DrillState.ExpandAll;
olapReport.SeriesElements.Add(dimensionElementRow);
olapReport.CategoricalElements.Add(measureElement);
return olapReport;

 

VB

Dim olapReport As OlapReport = New OlapReport() With {.Name = "Default Report"}
olapReport.CurrentCubeName = "Adventure Works"
Dim measureElement As MeasureElements = New MeasureElements()
measureElement.Elements.Add(New MeasureElement With {.UniqueName = "[Measures].[Customer Count]"})
Dim dimensionElementRow As DimensionElement = New DimensionElement()
dimensionElementRow.Name = "Date"
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year")
dimensionElementRow.DrillState = DrillState.ExpandAll
olapReport.SeriesElements.Add(dimensionElementRow)
olapReport.CategoricalElements.Add(measureElement)
Return olapReport

 

Conclusion

I hope you enjoyed on how to expand all the members in the PivotGrid.

You can refer to our JavaScript Pivot Grid feature tour page to know about its other groundbreaking feature representations. You can also explore our documentation to understand how to present and manipulate data.

For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our JavaScript Pivot Grid and other JavaScript components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied