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.
-
2Can you add some code from your component and the html template?benPearce– benPearce2017-05-08 02:01:59 +00:00Commented May 8, 2017 at 2:01
-
plnkr.co/edit/x7skv0QRzFx9cBku2e93?p=previewuser6323582– user63235822017-05-08 08:47:11 +00:00Commented 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.user6323582– user63235822017-05-08 08:50:36 +00:00Commented May 8, 2017 at 8:50
-
vm.gridApi.selection.on.rowSelectionChangedBatch($scope, function(row, event) { vm.rowSelectAllEvent(row, event, vm); });user6323582– user63235822017-05-08 08:51:34 +00:00Commented May 8, 2017 at 8:51
-
It passes array of objects in row to 'row' in above function.user6323582– user63235822017-05-08 08:52:38 +00:00Commented May 8, 2017 at 8:52
Add a comment
|
1 Answer
You can use
selectAllVisibleRows(event) Api
Refer: http://ui-grid.info/docs/#/api/ui.grid.selection.api:PublicApi