问题
I am trying to get new data on my ag grid. I tried using
this.gridOptions.api.setRowData(rowdata);
but it throws this error
Cannot read property 'setRowData' of undefined
I have kept this method in the onGridReady
method at the onInit
method.
Not sure if that helps, but I am using cellRenderer
also.
Does this method work for anyone else?
Is there anything specific to call this method?
回答1:
The gridReady event has the api as a parameter. Try event.api.setRowData(), or set the row data using the rowData property instead.
回答2:
I faced this error when I did not add this line
modules = AllCommunityModules;
Hope this will help.
来源:https://stackoverflow.com/questions/44794635/cannot-read-property-setrowdata-of-undefined