如何在extjs网格(单元格编辑)中显示完整的列可编辑? [英] How to show complete column as editable in extjs grid(cell editing)?

查看:108
本文介绍了如何在extjs网格(单元格编辑)中显示完整的列可编辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用单元格编辑插件来编辑单元格。但是就像当我们点击那个colunm它会移动到编辑模式。我想用可编辑的文本框显示完整的列。

I am using cell editing plugin for editing a cell. But it is like when we click that colunm it will move to edit mode. I want to show complete column with editable text box.

目前我正在使用以下代码使其可编辑。

Currently I am using following code to make it editable.

selType: 'cellmodel',
plugins: [
   Ext.create('Ext.grid.plugin.CellEditing', {
      clicksToEdit: 1
   })
],


columns: [
    { text: ... },
    { text: ... },
    { text: ... },
    { text: 'TText', flex: 1, dataIndex: 'TText',
        editor: {
            xtype: 'textfield',
            allowBlank: false
        }
    }

]


推荐答案

我认为这对于您的情况会很好:

I think this will work good enough for your scenario:

columns: [
    { text: ... },
    { text: ... },
    { text: ... },
    { text: 'TText', flex: 1, dataIndex: 'TText',
        editor: {
            xtype: 'textfield',
            allowBlank: false
        },
        renderer: function(value, metaData){
            metaData.style = "border: 1px gray solid;";
            return value;
        }
    }

]

这篇关于如何在extjs网格(单元格编辑)中显示完整的列可编辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆