ActionColumn是有问题的(不敢说是BUG),text属性不起作用、iconCls不知所云,但是非要使用怎么办?下面是我做的一个例子可以看看用变态的方法解决它:
其中ms.gif是一个16*16的透明gif图像.....至此解决问题。。。。
其它更详细的可以参考它的API文档。
xtype : "actioncolumn",
html:'<div class="x-column-header-inner" id="ext-gen1293" style="padding-top: 0px; height: auto; "><span class="x-column-header-text" id="ext-gen1295">帐号状态</span><div class="x-column-header-trigger" id="ext-gen1294"></div></div>',
sortable : false,
dataIndex : "enabled",
items: [{
icon:"js/extjs/resources/icons/ms.gif",
tooltip: '改变帐号状态',
getClass:function(v,m,r,rIndex,cIndex,store){
if (r.get('enabled')){
return 'unlock';
}else{
return 'lock'
}
},
handler: function(grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
rec.set("enabled",!rec.get("enabled"));
rec.commit();
}
}]
其中ms.gif是一个16*16的透明gif图像.....至此解决问题。。。。
其它更详细的可以参考它的API文档。