Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/378.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
Javascript ExtJS 4使用Ext.grid.plugin.RowEditing基于另一个更改单元格值_Javascript_Extjs_Extjs4_Listener - Fatal编程技术网

Javascript ExtJS 4使用Ext.grid.plugin.RowEditing基于另一个更改单元格值

Javascript ExtJS 4使用Ext.grid.plugin.RowEditing基于另一个更改单元格值,javascript,extjs,extjs4,listener,Javascript,Extjs,Extjs4,Listener,我有多个列的TreeGrid,我使用行编辑插件来保存数据。我想在“价格”改变时动态地改变“总计”的值。我做了以下的,但它不起作用。 当我查看“Total”对象时,我看到T值发生了变化,但在编辑时和更新之前,在RowEditing插件中看不到这一点 { text: 'price', dataIndex: 'price', editor: { xtype: 'textfield', listeners: {

我有多个列的TreeGrid,我使用行编辑插件来保存数据。我想在“价格”改变时动态地改变“总计”的值。我做了以下的,但它不起作用。 当我查看“Total”对象时,我看到T值发生了变化,但在编辑时和更新之前,在RowEditing插件中看不到这一点

{
    text: 'price',        
    dataIndex: 'price',
    editor: {
    xtype: 'textfield',
            listeners: {
                change: function (field, newValue, oldValue, eOpts) {
                    var selectedModel = MyTree.getSelectionModel().getSelection()[0];
                    selectedModel.set('total', 'Total sum is' + field.value);
                }
            }
    }
}, 
{ 
    text: 'total',        
    dataIndex: 'total',
    editor: {
        xtype: 'textfield'
    }
}
我找到了解决办法

var total = MyTree.getPlugin('roweditor').editor.down('textfield[name=total]');
total.setValue('Total sum is' + field.value);`

它也不起作用:(