Reputation: 31
Hello how can i get values from this object enter image description here and push them into an empty array this is the code. I don't want to use path may be there is there a function to get them or another code Thx
var selectedRowIndexes = [];
// returns an array of selected records
var selectedBanners = grid.getSelectionModel().getSelection();
console.log(selectedBanners);
Ext.iterate(selectedBanners, function(banner, data) {
// push the row indexes into your array
selectedRowIndexes.push(grid.getStore().indexOf(banner));
});
Upvotes: 0
Views: 5270
Reputation: 30092
getSelection
gives you an array of selected records.
For each record, you can extract a field using:
record.get('theField');
Upvotes: 7