title: Repopulate ag-grid with data
body: <p>I am initialising the ag-grid from the html using an <code>onGridReady</code> method in the component file. </p>
  
  <pre><code>&lt;div style="flex-grow:1;"&gt;
      &lt;ag-grid-angular
  
        style="float:left;width: 100%; height: 201px;margin-top:10px;"
        class="ag-theme-balham"
        [gridOptions]="gridOptions"
        [columnDefs]="columnDefs"
        (gridReady)="onGridReady($event)"
        [rowData]="rowData"
        #grid
      &gt;
      &lt;/ag-grid-angular&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>In my <code>.ts</code> file i am handling the <code>onGridReady</code> like below :</p>
  
  <pre><code>onGridReady(params?: any) {
      console.log("onGridReady");
      var datasource = {
        getRows: (params: IGetRowsParams) =&gt; {
          this.info = "Getting datasource rows, start: " + params.startRow + ", end: " + params.endRow;
          console.log(this.info);
          this.getRowData().then(data =&gt; {
            if (this.stopApiCalls) {
              var lastRow = this.allTableData.length;
              params.successCallback(data, lastRow)
            }
            else {
              params.successCallback(data)
            }
          })
        }
      };
      console.log("&gt;&gt;",datasource);
      params.api.setDatasource(datasource);
    }
  </code></pre>
  
  <p><code>this.getRowData</code> is used to get the data from the backend service using http. </p>
  
  <p>I now need to reinitalise and use <code>onGridReady</code> on a certain event handled in a different component file. I am able to access the methods in my ag-grid component. But how can i call the <code>onGridReady</code> event from the other component? </p>