var cm = new Ext.grid.ColumnModel([{
id:'common',
header: "Common Name",
dataIndex: 'common',
width: 220,
editor: new fm.TextField({
allowBlank: false,
listeners:{
//我想在这里添加一个事件,让这个TextField显示的时候根据显示值来决定这个TextField是否可以
//编辑,也就是说Grid的每列的每个cell因为值不同而决定是否可编辑。帮忙看看!
}
})
},{
header: "Light",
dataIndex: 'light',
width: 130,
editor: new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
transform:'light',
lazyRender:true,
listClass: 'x-combo-list-small'
})
},{
header: "Price",
dataIndex: 'price',
width: 70,
align: 'right',
renderer: 'usMoney',
editor: new fm.NumberField({
allowBlank: false,
allowNegative: false,
maxValue: 100000
})
},{
header: "Available",
dataIndex: 'availDate',
width: 95,
renderer: formatDate,
editor: new fm.DateField({
format: 'm/d/y',
minValue: '01/01/06',
disabledDays: [0, 6],
disabledDaysText: 'Plants are not available on the weekends'
})
}
]);
问题:
{
id:'common',
header: "Common Name",
dataIndex: 'common',
width: 220,
editor: new fm.TextField({
allowBlank: false,
listeners:{
//我想在这里添加一个事件,让这个TextField显示的时候根据显示值来决定这个TextField是否可以
//编辑,也就是说Grid的每列的每个cell因为值不同而决定是否可编辑。帮忙看看!
}
})
}