【发布时间】:2015-01-03 21:55:34
【问题描述】:
我正在使用带有复选框选择模型的 GridPanel。我有一列呈现为文本字段供用户输入数量。问题是,一旦我为一个项目输入了一个值,即使我为'checkOnly'设置了true,上一行的复选框也会被取消选择
下面是我的网格面板
Ext.define('demo.view.productsGridPanel', {
extend : 'Ext.grid.Panel',
alias : 'widget.productsGridPanel',
selModel: Ext.create('Ext.selection.CheckboxModel', {
mode: 'MULTI',
checkOnly: true
}),
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
initComponent : function() {
var me = this;
this.store = Ext.StoreManager.get('demo.store.Products');
this.columns = [
{
header : 'Product Code',
dataIndex : 'code',
flex : 1
},
{
header : 'Product Name',
dataIndex : 'name',
flex : 2
},
{
header : 'Product Price',
dataIndex : 'price',
flex : 1
},
{
header: 'Enter Qty',
flex: 1,
dataIndex : 'quantity',
editor: {
xtype: 'textfield',
allowBlank: true
}
},
];
this.callParent(arguments);
}
});
任何帮助将不胜感激。
【问题讨论】: