Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
WinPivotGrid Expand All Hierarchies Via Code
posted

I can't seem to find a way to expand all the Hierachy's on load or via code. Is this available? Version 15.1

Parents
No Data
Reply
  • 23930
    Offline posted

    Hi Jose,

    Thank you for posting in our forums.

    The data sources have an ExpandExisMemberAsync method which can be used to expand all hierarchies of the grid. To do that you can use the InitializeColumn and InitializeRow events of the PivotGrid and use the following code:

    FlatDataSource ds = ultraPivotGrid1.DataSource as FlatDataSource;

                // For the InitializeColumn event substitute the e.Row with e.Column

                if (e.Row.IsExpandable && e.Row.Expanded == false && ds.IsAsyncOperationPending == false)

                {

                    ds.ExpandAxisTupleMemberAsync(Infragistics.Olap.AxisType.Row, e.Row.TupleIndex, e.Row.MemberIndex, true, this.ultraPivotGrid1);

                }

    Please let me know if you have any additional questions.

Children