答案 0 :(得分:3)
你也可以这样做
检查小提琴:
localizedDescription
var userStore = Ext.create('Ext.data.Store', {
data: [{
"id": 1,
"abbr": "AL",
"name": "Alabama",
"completed":false
}, {
"id": 2,
"abbr": "AK",
"name": "Alaska",
"completed":false
}, {
"id": 3,
"abbr": "AZ",
"name": "Arizona",
"completed":false
}]
});
Ext.create('Ext.grid.Panel', {
renderTo: document.body,
store: userStore,
width: 400,
height: 200,
title: 'Application Users',
columns: [{
width: 25,
align: 'left',
xtype: 'checkcolumn',
tdCls: 'checkBoxColum',
dataIndex: 'completed',
renderer: function (value, meta, record, row, col) {
/* Permission Check */
var me = this;
if(record.data.id==1)
{
meta['tdCls'] = 'x-item-disabled';
}else
{
meta['tdCls'] = '';
}
return new Ext.ux.CheckColumn().renderer(value);
}
}, {
text: 'name',
width: 100,
sortable: false,
hideable: false,
dataIndex: 'name'
}]
});
答案 1 :(得分:0)