我正在使用ExtJs 3.4。我在ExtJs Grid中有一個複選框控件。我想根據存儲中的值何時等於零來禁用複選框控件。如何禁用ExtJS網格中的控件?
我已經嘗試這樣做,它不會禁用它:提前
var colModel = new Ext.grid.ColumnModel(
{
columns: [
{ id: 'AircraftOid', header: "AircraftOid", width: 100, sortable: true, locked: true, dataIndex: 'AircraftOid', hidden: true },
{ id: 'nNumber', header: "N-#", width: 100, sortable: true, locked: true, dataIndex: 'NNumber' },
{ header: "Make", width: 150, sortable: true, dataIndex: 'Make' },
{ header: "Model", width: 150, sortable: true, dataIndex: 'Model' },
{ header: "Register",
width: 55,
sortable: true,
dataIndex: 'Register',
xtype: 'checkcolumn'
}
],
isCellEditable: function (col, row) {
return false;
}
});
var grid = new Ext.grid.GridPanel({
store: aircraftStore,
cm: colModel,
sm: new Ext.grid.RowSelectionModel({ singleSelect: true }),
viewConfig: {
forceFit: true
},
height: 100,
split: true,
region: 'north'
});
感謝。
您是否嘗試將renderer屬性添加到複選框列?我的意思是{頭: 「註冊」, 寬度:55, 排序:真實, dataIndex: '註冊', 的xtype: 'checkcolumn', 渲染:renderFunction } – scusyxx 2012-07-11 22:15:33