get data of selected rows in slickgrid

前端 未结 5 410
渐次进展
渐次进展 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:21

    You have a mistake. It needs to be "getDataItem" and not "getData".

    var selectedData = [],enter code here`selectedIndexes;
    
    selectedIndexes = _grid.getSelectedRows();
    jQuery.each(selectedIndexes, function (index, value) {
        selectedData.push(_grid.getDataItem(value));
    });
    

提交回复
热议问题