Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 有多少行是可见的?_Angularjs_Angular Ui Grid - Fatal编程技术网

Angularjs 有多少行是可见的?

Angularjs 有多少行是可见的?,angularjs,angular-ui-grid,Angularjs,Angular Ui Grid,在Angular UI网格中,是否有任何方法可以告诉我的网格中有多少行是可见的?例如,如果我有5000行,然后进行筛选,剩下2500行,有没有办法通过gridApi?检查您是否有一个您尝试过的示例?如果尚未合并页脚元素,请从那里开始 您甚至可以为每列创建页脚,以聚合任何现有数据。显示您所做的工作?有一种方法,即ui网格分页 $scope.gridOptions = { showGridFooter: true, showColumnFooter: true, enabl

在Angular UI网格中,是否有任何方法可以告诉我的网格中有多少行是可见的?例如,如果我有5000行,然后进行筛选,剩下2500行,有没有办法通过
gridApi

检查您是否有一个您尝试过的示例?如果尚未合并页脚元素,请从那里开始


您甚至可以为每列创建页脚,以聚合任何现有数据。

显示您所做的工作?有一种方法,即ui网格分页
$scope.gridOptions = {
    showGridFooter: true,
    showColumnFooter: true,
    enableFiltering: true,
    columnDefs: [
        { field: 'name', width: '13%' },
        { name: 'registered', field: 'registered', width: '20%', cellFilter: 'date', footerCellFilter: 'date', aggregationType: uiGridConstants.aggregationTypes.max }
    ],
    data: data,
    onRegisterApi: function(gridApi) {
        $scope.gridApi = gridApi;
    }
};

$scope.toggleFooter = function() {
    $scope.gridOptions.showGridFooter = !$scope.gridOptions.showGridFooter;
    $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
};