【问题标题】:How to catch last row edit event in extjs3 grid如何在 extjs3 网格中捕获最后一行编辑事件
【发布时间】:2013-09-24 09:36:24
【问题描述】:

我有 ExtJs 网格,我想将空的可编辑行保留为网格中的最后一行。因此,当在最后一行输入内容时,我想在网格中添加另一个空的最后一行(开始输入/编辑最后一行时)。但我无法捕捉最后一行的输入/编辑事件。

this.mygrid.on('isLastrowtyping',function(){
   //this.addEmptyLastrow();
   }),this);

ExtJs3 中是否有任何事件为“isLastrowtyping”,如果没有,我如何使用 ExtJs 捕获此事件

【问题讨论】:

    标签: extjs extjs3 extjs-grid


    【解决方案1】:

    您应该在网格的编辑器中添加事件处理程序:

    editor.on('afteredit',
        function(e){
                    if (e.row==e.grid.store.data.length)
                    {e.grid.store.data.add(%%youremptyrow%%)}   
                    }),this);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多