In order to achieve this you need to copy the model (record) from the grid store's first record to the second record.
Check out this fiddle, this is the code (modern toolkit):
Ext.application({
name: 'Copy / paste grid row',
launch: function () {
var store = Ext.create('Ext.data.Store', {
fields: ['name', 'phone'],
data: [{
name: 'one',
phone: 123,
}, {
name: null,
phone: null
}]
});
Ext.create({
xtype: 'panel',
tbar: [{
text: 'Copy',
handler: function (button, e) {
var firstRecord = store.getAt(0),
secondRecord = store.getAt(1);
secondRecord.copyFrom(firstRecord);
secondRecord.commit();
}
}],
items: [{
xtype: 'grid',
title: 'Copy and paste grid row',
store: store,
columns: [{
text: 'name',
dataIndex: 'name',
flex: 1,
}, {
text: 'phone',
dataIndex: 'phone',
flex: 1
}],
}],
layout: 'fit',
fullscreen: true,
renderTo: Ext.getBody()
});
}
});