【问题标题】:Edit row in EXTJS grid on clicking edit button with a new window opened for editing the fields单击编辑按钮编辑 EXTJS 网格中的行,并打开一个新窗口以编辑字段
【发布时间】:2014-01-09 04:10:04
【问题描述】:

我正在开发一个 EXTJS 应用程序,我在 EXTJS 网格中显示数据。

每一行都有一个编辑按钮。请检查图像。

我想点击编辑链接,会打开一个包含所有可编辑字段的弹出窗口,我可以从那里编辑行。

请帮助我实现这一目标。

这是我的代码。

{
    xtype:'actioncolumn',
    width:50,
    items: [{
        icon: 'assets/images/edit.png',  // Use a URL in the icon config
        tooltip: 'Edit',
        handler: function(grid, rowIndex, colIndex) {
            var rec = grid.getStore().getAt(rowIndex);
            alert("Edit " + rec.get('ID'));
        }
    }
}

谢谢

【问题讨论】:

    标签: extjs extjs4


    【解决方案1】:

    我不会为你编写代码,但这是你需要的:

    【讨论】:

      【解决方案2】:

      点击按钮后(你得到行/记录的id),你可以打开一个包含表单网格的窗口,然后将数据加载到表单中。

      【讨论】:

        猜你喜欢
        • 2011-12-05
        • 2014-05-16
        • 2015-03-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-02-04
        • 1970-01-01
        • 2021-07-08
        相关资源
        最近更新 更多