Reputation: 73
On an Edit button click I'm reconfiguring gridOptions by setting the editable property of columns to true and making several other data changes. The gridOptions property is updated correctly however on calling this.gridOptions.api.refreshView() inside AfterContentChecked lifecycle event of Angular 2 the grid view is not getting updated.
Thanks.
Upvotes: 2
Views: 7007
Reputation: 7179
Most gridOption properties are read once at grid initialization and not again.
If you want to update data you'll need to use the api (ie api.setRowData for blanket changes, or see the refresh docs ( https://www.ag-grid.com/javascript-grid-refresh/ ) for more lower level editing options.
For column editing, the editable property can be a function, which could read some other data to determine if a column/cell is editable.
Upvotes: 3