Reputation: 852
I have the latest enterprise edition of Ag-Grid in the Angular app. I've server-side data rendered in Ag-Gird master detail view. Also, I've implemented the save table state for both master & detail grids but the issue is, that when I hide some columns from the detail grid of one row, it does not update the detail grid for other rows. How can I update that to reflect on every detail grid?
Upvotes: 0
Views: 235
Reputation: 852
I've achieved it using the gridReady
option of the detail grid:
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();
}
}
Upvotes: 0