我正在尝试定义列。
import { GridOptions } from "ag-grid-community";
import "ag-grid-enterprise";
......
private gridOptions:GridOptions;
.....here I fill columdDefs
this.gridOptions.api.setColumnDefs(columnDefs);
但是当我执行时,我得到了这个错误。
Unhandled rejection TypeError: Cannot read property 'api' of undefined at HoursDataTable.defineColumns
有什么好主意吗? 问候
解决了添加这个
this.gridOptions = <GridOptions>{};
谢谢