title: Ag Grid - On cancel reset table to original state
body: <p>When users modify any data in the table and on click of the cancel button i need to restore the data to original state .</p>
  
  <p>Issue is, resetRowData() function is not resetting the original value but instead it deletes all the record in the table. Please help</p>
  
  <p>Note: I'm using Angular 2</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>resetRowData() {
    this.rowData = [];
    this.gridOptions.api.setRowData(this.rowData);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button class="secondary-btn btn-pair" (click)="onCancelRowClicked()"&gt;Cancel&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>