William Troup
William Troup

Reputation: 13141

Get row data in Ext JS 3.0 Grid

I have a grid, which I want to add a button at the top to get the data from a specific column for each row selected in the grid. How would I go about doing this?

Upvotes: 0

Views: 7677

Answers (1)

rodrigoap
rodrigoap

Reputation: 7480

Add something like this to the button's click event:

rowsSelected = myGrid.getSelectionModel().getSelections();
for(...){
    aRecord = rowsSelected[i];
    filedValue = aRecord.get('fieldName');
}

Upvotes: 4

Related Questions