日期:2014-05-16  浏览次数:20333 次

在下面的extjs列表中该怎么添加属性让其数量这个字段可以编辑
在下面的extjs列表中该怎么添加属性让其数量这个字段可以编辑?就是变成编辑框状态



columns : [  {
text : '名称',
dataIndex : 'name'
},  {
text : '规格型号',
dataIndex : 'expmodel'
},  {
text : '单位',
dataIndex : 'expdetailunit'
},  {
text : '数量',
dataIndex : 'quantity'
}]
extjs

------解决方案--------------------
  {
text : '数量',
dataIndex : 'quantity',
editor: { xtype: 'textfield'}////点击可编辑
}

------解决方案--------------------
引用:
JavaScript code?12345  {text : '数量',dataIndex : 'quantity',editor: { xtype: 'textfield'}////点击可编辑}


版主这样添加后还需要在grid中与column统计添加
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
floating:false
})
        ]