I can't see where I could add buttons. It seems they are creating them in Rowediting.initEditor(), which is not extensible, seeing as it creates the row editor at the end.
Currently, a friend suggested I use interceptAfter. Here's what he used:
Code:
//Create the row editor
rowEd = Ext.create('Ext.grid.plugin.RowEditing', {
pluginId: 'roweditor',
autoCancel: false,
buttons: [{
xtype : 'button',
action: 'sayhi',
text: "HI"
maxWidth: 22
},{
xtype : 'button',
action : 'saybye',
text: "BYE"
maxWidth: 22
}]
});
//Add an intercept to allow buttons to be added to the editor
Ext.Function.interceptAfter(rowEd,'startEdit',function(){
var me = this;
var floatPanel = me.editor.floatingButtons;
if ((me.hasOwnProperty('buttons') && me.buttons.length >0) && floatPanel.items.getCount() == 2){
Ext.each(me.buttons,function(item){
var btn = floatPanel.add(item);
floatPanel.setWidth(floatPanel.getWidth()+btn.getWidth()+5);
})
}
//Fix border width
floatPanel.getEl().down('.x-grid-row-editor-buttons-bc').setWidth(floatPanel.getWidth()-6);
floatPanel.doLayout();
},rowEd);