xtype : "actioncolumn",
html:'
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文档。
2
顶
0
踩
分享到:
2011-07-10 23:50
浏览 8979
评论
3 楼
andy_ghg
2011-12-05
zp840566233 写道
text不起作用 可用 header ,iconCls不知所云 需要把图片样式设置宽高!如:
.icon-class {
height: 16px;
width: 16px;
background-image: url(../images/button/class.gif) !important;
}
谢谢指点
2 楼
zp840566233
2011-12-05
text不起作用 可用 header ,iconCls不知所云 需要把图片样式设置宽高!如:
.icon-class {
height: 16px;
width: 16px;
background-image: url(../images/button/class.gif) !important;
}
1 楼
zhouzhiyong
2011-11-24
header: 'Options', 这个就好了 你多虑了