title: Dynamically changing Cell Renderer of ag-grid using param function in Angular 8
body: <p>Can someone help me out with this?
  I'm using ag-Grid in Angular 8, where I have a column which has cell renderer as a single button (let's say Delete button), but when the grid fires cellValueChange Event i.e when a particular cell value change I want delete button cell renderer to get replaced with other cell renderers.</p>
  
  <p>Here what I'm doing,</p>
  
  <pre class="lang-js prettyprint-override"><code>columnDefs: {
  
      headerName: 'Delete'
      cellRenderer: (params: ICellRendererParams) =&gt; {
          return getCellRenderer(params);
      }
  }
  
  getCellRenderer(params)
  {
      if (params.value.isEdit)
          return 'updateRenderer';
      else
          return 'deleteRenderer';
  }
  </code></pre>
  
  <p><code>isEdit</code> is a hidden column in a grid whose value is set to 1 on event call, else by default it will be 0 for all rows.</p>
  
  <p>So, this function should return the renderer. I have created frameworkComponent as below:</p>
  
  <pre class="lang-js prettyprint-override"><code>frameworkComponent: {
      deleteRenderer: DeleteRendererComponent,
      updateRenderer: UpdateRendererComponent
  } 
  </code></pre>
  
  <p>Now, when I provide cellRenderer: 'deleteRenderer', I got a proper component rendered.
  But when I call it through function I only got string printed as deleteRenderer, not the component.</p>
  
  <p>Thank in advance, any help will be appreciated.</p>