0
votes

I currently have this code for my method:

createPlaylist:function(record){
    var scope = this;
    var vo = record;
    var sel = scope.getShowImages().getSelectionModel().getSelection();

    var filename = sel[0].data.filename;
    console.log(filename);
}

All I get is the value of the first cell selected, but since my seltype of my grid is checkboxmodel, I want to get all the values of the selected cells.

1

1 Answers

0
votes

i assume you are using a checkcolumn. in your handler, you can try the following:

var r = grid.store.getRange();
var selected = [];

for (var i = 0; i < r.length; i++) {
    if (r[i] != null) {
        if (r[i].data.checkcolumn_dataIndex) { //checks if row is selected
            selected.push(r[i].data);
        }
    }
}