Skip to content

Instantly share code, notes, and snippets.

@ahhqcheng
Created August 15, 2013 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahhqcheng/6239479 to your computer and use it in GitHub Desktop.
Save ahhqcheng/6239479 to your computer and use it in GitHub Desktop.
Ext对于表格中的字过长,当鼠标移上去显示全部信息的实现方式
{
header: 'id',
dataIndex: 'id',
hidden: false,
flex: 2.5,
renderer:function(before,metadata,r){
var value = before.replace(/\n/g,'</br>');
metadata.tdAttr = 'data-qtip="' + value + '"';
return before.replace(/\n/g,'&nbsp;');
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment