To know which cell is selected, please use the CellSelection model
var myGrid = new Ext.grid.EditorGridPanel({
// ...
selModel: new Ext.grid.CellSelectionModel(),
// ...
});
Then you can call each record of the store and change the needed value:
// Button that changes all the column names
var applyToAll = new Ext.Button({
text: "Apply to All",
handler: function(){
var record = myGrid.getSelectionModel().getSelected();
var row = myGrid.getSelectionModel().getSelectedCell()[0];
var col = myGrid.getSelectionModel().getSelectedCell()[1];
var column_name = myGrid.getColumnModel().getColumnAt(col).dataIndex;
myGrid.getStore().each(function(rec){
rec.set(column_name, myGrid.getStore().getAt(row).get(column_name));
});
}
});