如何更新AG网格主详细信息视图中的所有详细信息网格columnDef?

问题描述 投票:0回答:1

我在 Angular 应用程序中拥有最新的 Ag-Grid 企业版。 我已在 Ag-Gird 主详细信息视图中呈现服务器端数据。 另外,我已经实现了主网格和详细网格的保存表状态,但问题是,当我从一行的详细网格中隐藏某些列时,它不会更新其他行的详细网格。我如何更新它以反映每个细节网格?

javascript angular ag-grid
1个回答
0
投票

我已经使用细节网格的

gridReady
选项实现了它:

onGridReady: e => {
        const state = this.paymentsColApi?.getColumnState();
        if (state) {
          e.columnApi.applyColumnState({
            state: state,
            applyOrder: true
          });
        }
        this.paymentsGridApi = e.api;
        this.paymentsColApi = e.columnApi;
        if (this.isFirstTimePaymentsGridLoad) {
          this.restorePaymentsGrid();
        }
      }
© www.soinside.com 2019 - 2024. All rights reserved.