Sunday 26 May 2019

AG Grid - Best way to access to the GridApi



Which is the cleanest way to access to the GridApi of the AG Grid:



Option1




import { AgGridNg2 } from 'ag-grid-angular';

@ViewChild('agGrid') agGrid: AgGridNg2;


Option2



Event onGridReady

Answer




The best way is to use onGridReady function and use params.api to assign by your property


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...