简体   繁体   English

在带有CellEditing插件的Ext JS 4网格中,如何以编程方式修改相邻的单元格

[英]In Ext JS 4 grid with CellEditing plugin how to modify programatically an adjacent cell

Example is I have a CellEditing grid with one checkcolumn and another numbercolumn which is adjacent to it. 例子是我有一个CellEditing网格checkcolumn和另一numbercolumn ,邻接于它。 I simply want when the checkcolumn 's row is checked/unchecked to modify the adjacent to it numbercolumn , ... respectively with 0 if unchecked, or another number if checked? 我只是希望在checkcolumn的行被选中/取消修改与其相邻的numbercolumn如果选中,......分别以0如果不加以控制,或另一个号码?

To set a value on the adjacent cell, on the checkcolumn put this: 要在相邻单元格上设置一个值,请在检查checkcolumncheckcolumn以下内容:

listeners : {
                            checkchange : function( CheckColumn, rowIndex, checked, eOpts ) {
                                var record = me.down('grid').getView().getRecord(rowIndex);
                                record.set('howMuch',0);
                            }
                        }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM