在电网“actioncolumn”我用“渲染”像显示的图像,如何调用操作仅在操作列图像不能在网格单元
图像+文字
在操作栏点击我打电话一些行动,
但点击事件触发甚至点击网格单元格中的空白空间。 如何防止点击空的空间。
如何识别点击链接(图片+文字),而不是网格单元格的空白处。
{
xtype: 'actioncolumn',
width: '17%',
text: 'Display Option',
renderer: function (value, metadata, record) {
var label = '';
if (record.get('status') == 0) {
lable = 'Show';
etadata.style += 'margin-top:10px;cursor:pointer;';
return '<span style="font-size: 14px; color:#3b87de; font-family:arial; margin-left:-3px;">' + '<img src="resources/images/show_msg.png"/>' + label + '</span>'
} else {
metadata.style += 'margin-top:10px;cursor:pointer;';
lable = 'Hide';
return '<span style="font-size: 14px; color:#3b87de; font-family:arial;">' + '<img src="resources/images/hide_fault.png"/>' + label + '</span>'
}
},
handler:function(grid, rowIndex, columnIndex, e){
console.log('handler test');//not triggering
},
listeners: {
click: function (grid, rowIndex, colIndex) {
console.log('handler test');// triggering
}
}
感谢
您是如何将操作链接到动作列的?我经常使用actioncolumns,从来没有这个问题。我将粘贴我通常使用的代码。 – 2015-02-23 11:51:58