1

Is it possible to trigger the update button in a Row-editing by just clicking the row I want to edit ?

I have this:

plugins: [
    Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToEdit: 1,
        saveBtnText: 'Actualizar',
        cancelBtnText: 'Cancelar',
        listeners: {
            edit: function(editor, context, eOpts) {
                SgaWeb.app.getController('app').function()
            },
            canceledit: function(editor, context, eOpts) {
                var fila = me.store.getAt(0);
                if (fila.get('codigoDato') == '0') {
                    me.store.removeAt(0);
                }
            },
            beforeedit: function(editor, context, eOpts) {
                editor.getEditor().floatingButtons.hide();
                //alert(context.record.get('codGenero'));                                                                                                                                                                                                            
            },
            validateedit: function(editor, context, eOpts) {


            }

        }
    })
]

This is working just fine but I want to make it update when I click once the row I want to edit. By this way I still have to click the button update or pressing enter to trigger the edit action. I managed to hide the buttons update and cancel.

Narendra Jadhav
  • 10,052
  • 15
  • 33
  • 44
001
  • 11
  • 4

1 Answers1

0

You can use below code snippet to trigger update button (code snippet) :-

your_grid.getPlugin('your_plugin_id').editor.down('button[itemId=update]').fireHandler();
Rohit Sharma
  • 1,402
  • 9
  • 20