【问题标题】:Trigger Update button in RowEditingRowEditing 中的触发更新按钮
【发布时间】:2018-09-23 04:30:27
【问题描述】:

是否可以通过单击我要编辑的行来触发行编辑中的更新按钮?

我有这个:

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) {


            }

        }
    })
]

这工作得很好,但我想在我点击一次我想编辑的行时让它更新。通过这种方式,我仍然必须单击按钮更新或按回车来触发编辑操作。我设法隐藏了更新和取消按钮。

【问题讨论】:

    标签: extjs grid roweditor


    【解决方案1】:

    您可以使用下面的代码 sn-p 来触发更新按钮(代码 sn-p):-

    your_grid.getPlugin('your_plugin_id').editor.down('button[itemId=update]').fireHandler();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-30
      • 1970-01-01
      • 1970-01-01
      • 2012-05-26
      相关资源
      最近更新 更多