1

I have created pagination using Angular ui-grid. My requirement is if i select header row of the grid then all rows should be selected on the same page. But it is selecting all rows in every page which are present in the pagination. Ex:- If i am on 1st page of pagination then it should select all rows on 1st page only. But now it is selecting all rows in next 10 pages.

5
  • 2
    Can you add some code from your component and the html template? Commented May 8, 2017 at 2:01
  • plnkr.co/edit/x7skv0QRzFx9cBku2e93?p=preview Commented May 8, 2017 at 8:47
  • For your reference please check above plunker. In this example, if i click on header row then it selects all rows in current page as well as every next page. But i want it to select all rows on current page. Not on next or previous any page. Commented May 8, 2017 at 8:50
  • vm.gridApi.selection.on.rowSelectionChangedBatch($scope, function(row, event) { vm.rowSelectAllEvent(row, event, vm); }); Commented May 8, 2017 at 8:51
  • It passes array of objects in row to 'row' in above function. Commented May 8, 2017 at 8:52

1 Answer 1

0

You can use

selectAllVisibleRows(event) Api

Refer: 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.