Olap - grid and panel share same engine

Posted by: mary431982 on 6 February 2026, 12:01 pm EST

    • Post Options:
    • Link

    Posted 6 February 2026, 12:01 pm EST

    Hello,

    I have Olap grid always visible, and by clicking the button I can show in modal Olap panel chich shares the same pivotEngine with the Olap grid, when I close the modal and destroy the Olap panel - everything stops working because pivotEngine.itemSource becomes somehow null.

    What happened? It didn’t use to behave like that.

    <ng-template #pivotPanelTmpl>
        <mat-dialog-content>
            <wj-pivot-panel [itemsSource]="pivotEngine"></wj-pivot-panel>
        </mat-dialog-content>
        <mat-dialog-actions align="end">
            <button mat-button (click)="pivotPanelModalInstance.close()" mat-stroked-button>{{translationService.staticDictionary['Close']}}</button>
        </mat-dialog-actions>
    </ng-template>
    
    <div [ngClass]="{'dbg-display-none': !showChart, 'dbg-table-row' : showChart}">
        <wj-pivot-chart #pivotChart [itemsSource]="pivotEngine"></wj-pivot-chart>
    </div>
    
    <div class="dbg-table-row-control">
        <div class="dbg-control-content-wrapper" (contextmenu)="$event.stopPropagation()">
            <wj-pivot-grid #pivotGrid [itemsSource]="pivotEngine"></wj-pivot-grid>
        </div>
    </div>
    

    Best regards,

    Mary

  • Posted 9 February 2026, 5:26 am EST

    Hi Mary,

    It seems this behavior is now updated. Disposing the PivotPanel disposes the pivot engine as well, which is attached to the PivotPanel. To avoid this issue, you can change the pivotEngine assigned to the target pivotPanel before disposing it. Please refer to the following code snippet -

    pivotPanel.engine = new wjOlap.PivotEngine();
        pivotPanel.dispose();

    You can also refer to the following sample, demonstrating the same - https://stackblitz.com/edit/angular-7ewfawuu?file=src%2Fapp%2Fapp.component.ts

    In case, you still face any issues, please let us know.

    Regards

  • Posted 10 February 2026, 5:03 am EST

    Thank you!! Great idea!

    Regards,

    Mary

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels