在列映射的时候就要设定渲染方式
渲染的函数写成如下:
顶部需要加入
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代表内容。这时鼠标划过就会出现提示!
本文介绍了如何在Ext.js中为网格列设置自定义渲染方式,并通过Ext.QuickTips.init()启用快速提示功能,使用户在鼠标悬停时能够获取额外信息。




953

被折叠的 条评论
为什么被折叠?



