Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
extjs-行编辑器不工作_Extjs_Extjs4.2_Extjs Grid - Fatal编程技术网

extjs-行编辑器不工作

extjs-行编辑器不工作,extjs,extjs4.2,extjs-grid,Extjs,Extjs4.2,Extjs Grid,我有一个gridPanel,定义如下: Ext.define('Mb.view.winbiz.ExportGrid', { extend: 'Ext.grid.Panel', store: 'winbiz.Exports', plugins: [{ptype: 'rowediting', clicksToMoveEditor: 2, autoCancel: false}], columns: [ {text: 'Id', dataIndex: '

我有一个gridPanel,定义如下:

Ext.define('Mb.view.winbiz.ExportGrid', {
    extend: 'Ext.grid.Panel',
    store: 'winbiz.Exports',
    plugins: [{ptype: 'rowediting', clicksToMoveEditor: 2, autoCancel: false}],
    columns: [
        {text: 'Id',  dataIndex: 'id'},
        {
            text: 'Description', 
            dataIndex: 'description', 
            flex:1,
            editor: {
                xtype: 'textfield',
                allowBlank: false
            }
        }
    ]
});
我对行编辑插件有这个问题:
不再编辑双击的行,而是在网格顶部插入新行,但它不显示编辑器字段

我查看了代码中的所有地方,并与a进行了比较,但我找不到不正确的地方

这就是它的样子:

试试这个:

...
    {
        text: 'Description', 
        dataIndex: 'description', 
        flex:1,
        editor: { 
            xtype: 'textfield',
            allowBlank: true // (or false)
        }               
    }
....

行编辑器无法工作的原因如下:

我有一个自定义模板。rowEditiong插件工作所需的css未包括在内


一旦我用sencha app build重新构建了应用程序,css文件就被更新了,一切都很好。

我应用了你的建议,但没有任何帮助。我还添加了一个屏幕截图,“描述”字段是否由服务器/商店数据填充?如果不是,则调用属性为“allowBlank:false”的此字段的编辑器可能会出现问题。我看到整个网格中的所有“描述”字段都是空的。尝试设置allowBlank:true。虽然,我不认为这是原因。我没有使用自定义模板,只是在
sencha应用程序构建之后,行编辑器才工作。非常感谢您分享此解决方案。(我使用的是ExtJS4.2.1)。