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