1

I am currently using ui-grid and have run into a small problem. I want to be able to select all the items based on filters I have set within the grid. For example, if I do a select all without a filter, 500 items will be selected. Then, if I filter a column and select all, 500 items are again selected instead of the items that are currently being shown.

My select all logic is very simple per the ui-grid documentation:

$scope.selectAll = function () {
    $scope.gridApi.selection.selectAllRows();
};

$scope.clearAll = function () {
    $scope.gridApi.selection.clearSelectedRows();
};

The reason I want this is because I'm working on a mass delete - the ability to filter down the grid to items you can then delete simply by clicking select all and then delete.

1 Answer 1

1

You could try selectAllVisibleRows. http://ui-grid.info/docs/#/api/ui.grid.selection.api:PublicApi

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.