Extjs 在GridPanel中显示图标的方法
程序员文章站
2024-01-19 10:10:46
...
{header:'名称',width:200,sortable:true,dataIndex:'appname'},
{header:'图标',width:350,sortable:true,dataIndex:'appico',renderer:function(data, metadata, record, rowIndex, columnIndex, store) {
var data = record.data ;
var url = data.appico;
return String.format('<input id="show" type=image width=25 height=25 src='+url+' title="show"/>');
}},
给相应的列写个renderer即可
{header:'图标',width:350,sortable:true,dataIndex:'appico',renderer:function(data, metadata, record, rowIndex, columnIndex, store) {
var data = record.data ;
var url = data.appico;
return String.format('<input id="show" type=image width=25 height=25 src='+url+' title="show"/>');
}},
给相应的列写个renderer即可