无法读取未定义的属性“ setRowData” [英] Cannot read property 'setRowData' of undefined
本文介绍了无法读取未定义的属性“ setRowData”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在农业网格上获取新数据。我尝试使用
I am trying to get new data on my ag grid. I tried using
this.gridOptions.api.setRowData(rowdata);
但会引发此错误
无法读取未定义的属性'setRowData'
Cannot read property 'setRowData' of undefined
我将此方法保留在中
方法。 onInit
方法中的onGridReady
不确定是否有帮助,但是我也在使用 cellRenderer
。
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?
推荐答案
gridReady事件将api作为参数。尝试event.api.setRowData(),或改为使用rowData属性设置行数据。
The gridReady event has the api as a parameter. Try event.api.setRowData(), or set the row data using the rowData property instead.
这篇关于无法读取未定义的属性“ setRowData”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文