我正在使用 igx-grid
。当我使用 rowSelection
单击全选时,它会选择网格中存在的所有记录,而不是当前页面的记录。我想启用一些东西,当我点击选择所有 igx-grid 复选框时,它应该只选择当前页面记录,而不是全部。有没有办法做同样的事情?因为我从过去 3 天开始尝试,但没有得到任何解决方案。提前致谢!!!
最佳答案
以编程方式选择行:
<button (click)="this.grid.selectRows([1,2,5], true)">Select 1,2 and 5</button>
以编程方式取消选择行:
<button (click)="this.grid.deselectRows([1,2,5])">Deselect 1,2 and 5</button>
来源:Official documentation of igx-grid (Row Selection)
尝试使用 (onRowSelectionChange)
事件
关于javascript - 我只想选择当前页面的所有记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67224194/