0

我正在尝试从使用分页的 igGrid 中获取所有选定的行。问题是当我使用下面的代码时,我只得到当前页面(DOM)的选定行。不返回来自其他页面的选定行。

有没有办法为每一页获取所有选定的行?

下面是我获取所选行的代码。

function getGridSelectedRowIds(GridId) {

     //Here I get only the selected rows of the current page
     var selectedRows = $("#" + GridId).igGrid("selectedRows");
     $scope.totalSelectedRowsIds = [];
     _.each(selectedRows, function (row) {
         $scope.totalSelectedRowsIds.push(row.id);
     });

}
4

1 回答 1

1

您没有提供网格代码或 IgniteUI 版本,但这是一个适合您的工作小提琴

启用选择网格功能

{name: "Selection", multipleSelection:true}

这很好用

$("#grid").igGridSelection("selectedRows");
于 2017-11-03T14:46:28.457 回答