在列映射的时候就要设定渲染方式
渲染的函数写成如下:
顶部需要加入
qtitle代表tip的标题, qtip代表内容。这时鼠标划过就会出现提示!
- var colModel = new Ext.grid.ColumnModel([
- { header: "$ Sales", width: 100, sortable: true, renderer: heihei}
- ]);
var colModel = new Ext.grid.ColumnModel([ { header: "$ Sales", width: 100, sortable: true, renderer: heihei} ]);
渲染的函数写成如下:
- function heihei(value, meta, rec, rowIdx, colIdx, ds){
- return '<div ext:qtitle="" ext:qtip="' + value + '">'+ value +'</div>';
- }
function heihei(value, meta, rec, rowIdx, colIdx, ds){ return '<div ext:qtitle="" ext:qtip="' + value + '">'+ value +'</div>'; }
顶部需要加入
- Ext.QuickTips.init();
Ext.QuickTips.init();
qtitle代表tip的标题, qtip代表内容。这时鼠标划过就会出现提示!