簡體   English   中英

如何在ag-grid中顯示行數?

[英]How to display rows count in ag-grid?

如何顯示農業網格行的行數?

我嘗試鈎住modelUpdated事件,但未調用該事件。

我想顯示頁面加載時以及每行更改時的行數。

 <ag-grid-vue
          style="width: 700px;height: 500px;margin:20px 0;"
          class="ag-theme-balham"
          :enableCellChangeFlash="true"
          ...
          rowHeight="55"
          :modelUpdated="onModelUpdated"
        ></ag-grid-vue>

vue ,將@用於事件,而不要:

這里的代碼有效:

<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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM