[英]Extjs 4.X RowEditor trigger 'update' button
The RowEditor plugin on my grid works well but for one my use case I have to trigger the 'update' button programmatically and close the popped up RowEditor panel.我的网格上的 RowEditor 插件运行良好,但对于我的用例之一,我必须以编程方式触发“更新”按钮并关闭弹出的 RowEditor 面板。 For reference, below screenshot:
以下截图供参考:
I have tried below command but it does not seem to trigger the event.我试过下面的命令,但它似乎没有触发事件。
var updtBtn = grid.getPlugin('myPlugin').editor.floatingButtons.child('#update');
myBtn.fireEvent('click', myBtn);
I have created a fiddle to test this: fiddle for RowEditor update firevent我创建了一个小提琴来测试这个: fiddle for RowEditor update firevent
The above command (which did not work) gets executed on below steps:上面的命令(不起作用)在以下步骤中执行:
Any pointers on how to get this working is much appreciated.任何有关如何使这项工作的指示都非常感谢。
To make your edit complete you need to use grid.getPlugin('myPlugin').editor.completeEdit();
要使您的编辑完成,您需要使用
grid.getPlugin('myPlugin').editor.completeEdit();
instead of myBtn.fireEvent('click', myBtn);
而不是
myBtn.fireEvent('click', myBtn);
. .
Look on fiddle: https://fiddle.sencha.com/#view/editor&fiddle/330o看看小提琴: https : //fiddle.sencha.com/#view/editor&fiddle/330o
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.