[英]How to display rows count in ag-grid?
How to display rows count of ag-grid rows? 如何显示农业网格行的行数?
I have tried to hook modelUpdated
event but the event is not invoke. 我尝试钩住
modelUpdated
事件,但未调用该事件。
I want to display the rows count when the page is loaded and when every row change. 我想显示页面加载时以及每行更改时的行数。
<ag-grid-vue
style="width: 700px;height: 500px;margin:20px 0;"
class="ag-theme-balham"
:enableCellChangeFlash="true"
...
rowHeight="55"
:modelUpdated="onModelUpdated"
></ag-grid-vue>
In vue
, Use @
for events, and not :
在
vue
,将@
用于事件,而不要:
Here code that works: 这里的代码有效:
<ag-grid-vue
style="width: 700px;height: 500px;margin:20px 0;"
class="ag-theme-balham"
:enableCellChangeFlash="true"
...
rowHeight="55"
@modelUpdated="onModelUpdated"
></ag-grid-vue>
onModelUpdated(event) {
const rowsCount = event.api.getDisplayedRowCount();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.