{ text: "内容", width: 300, dataIndex: "MessageContent", menuDisabled: true,
//重点就是下面
renderer: function(value, metadata, record, rowIndex, columnIndex, store) {
metadata.tdAttr = 'title="'+value+'"';//在元数据中加入title属性
return Ext.util.Format.htmlEncode(value);//但是返回原内容,grid会自动截断其超长显示
}}
转载于:https://my.oschina.net/raddleoj/blog/357988