Angular UI-Grid: How to get number of total items after filtering
You should avoid jQuery (as another post suggests) and interact with the API instead.
You first need to save a reference to the API on the grids creation event.
$scope.gridOptions = {
....
onRegisterApi: registerGridApi,
....
};
function registerGridApi(gridApi) {
$scope.gridApi = gridApi;
}
You should already know the total number of rows.
You can get the number of visible/filtered rows with:
gridApi.core.getVisibleRows().length
or
gridApi.grid.getVisibleRows().length
You can get the number of selected rows with:
gridApi.selection.getSelectedRows().length