Ag grid 使用ag grid DataSource时,如何知道是否由于滚动或过滤而调用了getRows函数
正如我们所知,在Ag grid 使用ag grid DataSource时,如何知道是否由于滚动或过滤而调用了getRows函数,ag-grid,ag-grid-ng2,Ag Grid,Ag Grid Ng2,正如我们所知,在infiniterowModelType中,我们必须为 现在,dataSource.getRows方法在需要获取网格中的行时被调用(由于滚动)或过滤器被更改 我需要根据这个原因决定需要进行多少ajax调用。下面的代码块解释了这一点 private getRows(params: IGetRowsParams, data: any) { // two ajax calls can be made from here // 1. getCount // 2.
infinite
rowModelType
中,我们必须为
现在,dataSource.getRows
方法在需要获取网格中的行时被调用(由于滚动)或过滤器被更改
我需要根据这个原因决定需要进行多少ajax调用。下面的代码块解释了这一点
private getRows(params: IGetRowsParams, data: any) {
// two ajax calls can be made from here
// 1. getCount
// 2. getData
// if this getRows function is called due to scrolling in the grid,
// I just want to call getData - no need to call getCount as I already know it
// if this is called due to change in filter,
// I need to call getCount as well as the no of rows will be different
// How can I know here due to which above mentioned reasons, getRows is getting called?
}
在getRows
函数中是否有了解它的方法?该功能在中。AG-2001:将源添加到ISERVERSIDEGTROWSPARAMS
private getRows(params: IGetRowsParams, data: any) {
// two ajax calls can be made from here
// 1. getCount
// 2. getData
// if this getRows function is called due to scrolling in the grid,
// I just want to call getData - no need to call getCount as I already know it
// if this is called due to change in filter,
// I need to call getCount as well as the no of rows will be different
// How can I know here due to which above mentioned reasons, getRows is getting called?
}