2017-08-30 32 views
0

我想从使用分页的igGrid获取所有选定的行。问题是,当我使用下面的代码时,那么我只获取当前页面(DOM)的选定行。来自其他页面的选定行不会被返回。IgGrid:使用分页获取网格上的所有选定行

有没有办法让每个页面的所有选定的行?

下面是我得到选定行的代码。

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); 
    }); 

} 

回答

1

你没有提供你网格代码或IgniteUI版本,但这里是你的工作fiddle

启用选定网格功能

{name: "Selection", multipleSelection:true} 

并能正常工作

$("#grid").igGridSelection("selectedRows"); 
相关问题