I'm trying to get the instance of cell renderer (Angular component) on rowSelected event handler:
onRowSelected($event) {
var selectedRow = this.gridApi.getDisplayedRowAtIndex($event.rowIndex);
var params = { columns: ['added'], rowNodes: [selectedRow]};
var instances = this.gridApi.getCellRendererInstances(params);
if (instances.length > 0) {
var wrapperInstance = instances[0].getFrameworkComponentInstance();
}
}
Unfortunately I get the error during the compilation of angular application (ts):
Property 'getFrameworkComponentInstance' does not exist on type 'ICellRendererComp'
The implementation comes from official documentation at https://www.ag-grid.com/javascript-grid-cell-rendering-components/ (find Accessing Cell Renderer Instances).
Here is possible factory method which define public getFrameworkComponentInstance
.
It's unexpected situation because when I debug this method I can get the renderer with method getFrameworkComponentInstance
on instances[0]
.