Reputation: 510
i added custom column to ag-grid like this
this.columnDefs.push( {headerName: "Action Status", cellStyle:{"text-align":"center"}});
how to change a cell value of this column in runtime ?
i tried this solution but not work
this.gridOptions.api.forEachNodeAfterFilterAndSort(function (rowNode:RowNode) {
rowNode.columnController.originalColumns[1].colDef.headerCellTemplate="test"
});
this.gridOptions.api.softRefreshView();
this.gridOptions.api.refreshView();
Upvotes: 1
Views: 7703
Reputation: 510
the answer
this.columnDefs.push( {headerName: "Action Status",field:"actionStatus", cellStyle:{"text-align":"center"} })
-set new value like this
this.gridOptions.api.forEachNodeAfterFilterAndSort(function (rowNode:RowNode) {
rowNode.setDataValue("actionStatus","the new value") ... ... ...
Upvotes: 4