get data of selected rows in slickgrid

前端 未结 5 411
渐次进展
渐次进展 2021-01-05 08:04

I have a slickgrid in which some rows are hidden by a filter (DataView).

When I now call the getSelectedRows method of the grid I get the indices of the visibly sele

5条回答
  •  情话喂你
    2021-01-05 08:28

    You must do something like this:

    var selectedData = [],
        selectedIndexes;
    
    selectedIndexes = _grid.getSelectedRows();
    jQuery.each(selectedIndexes, function (index, value) {
      selectedData.push(_grid.getData()[value]);
    });
    

    Right now the selectedData variable contains data for selected rows.

提交回复
热议问题