1
votes

I'm trying to define the columns.

import { GridOptions } from "ag-grid-community";
import "ag-grid-enterprise";
......
private gridOptions:GridOptions;
.....here I fill columdDefs
this.gridOptions.api.setColumnDefs(columnDefs);  

but when I execute I get this error.

Unhandled rejection TypeError: Cannot read property 'api' of undefined    at HoursDataTable.defineColumns

Any idea please?
Regards

1

1 Answers

1
votes

Solved adding this

this.gridOptions = <GridOptions>{};

Thanks