title: How to change styles in ag-grid on event?
body: <p>I have looked in the ag-grid docs, but haven't found a solution for my problem.</p>
  
  <p>I want for row to change style on change event, or in other words mark it dirty.</p>
  
  <p>Currently my code is like this:</p>
  
  <p>component.html:</p>
  
  <pre><code>&lt;ag-grid-angular
      class="ag-theme-material table"
      [gridOptions]="gridOptions"
      (gridReady)="onGridReady($event)"
      (cellValueChanged)="cellValueChanged($event)"&gt;
  &lt;/ag-grid-angular&gt;
  </code></pre>
  
  <p>component.ts</p>
  
  <pre><code>onGridReady(params) {
      this.gridApi = params.api;
  }
  
  cellValueChanged(e) {
      const { data, oldValue, newValue } = e;
  
      if (newValue != oldValue) {
        this.gridOptions.rowStyle = { background: "#E4FFF9" };
      }
  }
  </code></pre>
  
  <p>Problem is that on first change event the style isn't applied and when I am re-applying data, all of the rows style's get changed even though the code doesn't even go in to the "IF" condition.</p>
  
  <p>Re-applying data with gridApi.setRowData([]) then gridApi.setRowData(data).</p>
  
  <pre><code>private dataChange() {
      this.buyerGridApi.setRowData([]);
      let gridData = [];
  
      gridData = [...some code]
  
      this.gridApi.setRowData(gridData);
  }
  </code></pre>