How to add custom column dynamically in ag-grid
<p>I'm stacked to add Custom columns dynamically in ag-grid.
I have tried following approach.</p>

<pre><code>additionalCol = { field:'SOME RANDOM', headerName: 'SOME RANDOM' };
$scope.gridOptions.columnApi.addValueColumn(additionalCol);
</code></pre>

<p>I have also tried</p>

<pre><code>$scope.columns.push(additionalCol);
$scope.gridOptions.api.refreshView();
</code></pre>

<p>but didn't get success.
I even tried to add columns that exist in Data but failed.
Below is Image for what I am trying.
<a href="https://i.stack.imgur.com/PQpvK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PQpvK.png" alt="enter image description here"></a></p>

<p>As shown in image "% dev" is Custom column which I need to add dynamically with dynamically calculated values.</p>