Extjs Grid 中的 ToolTip效果(2)

2019-03-23 10:28

193. /**

194. * Loads the data to apply to the tip template via Ajax 195. *

196. * @private

197. * @param {object} data Parameters for the Ajax request 198. * @param {Ext.ToolTip} tip The tooltip object 199. * @param {Ext.grid.GridPanel} grid The grid

200. * @param {Ext.ux.plugins.grid.CellToolTips} ctt The CellToolTips objec

t

201. * @param {String} tipid Id of the tooltip (= field name) 202. */

203. ,loadDetails: function(data, tip, grid, ctt, tipid) { 204. Ext.Ajax.request({

205. url: ctt.tipUrls[tipid], 206. params: data, 207. method: 'POST',

208. success: function(resp, opt) { 209. tip.finished = true;

210. tip.tipdata = Ext.decode(resp.responseText); 211. tip.show(); 212. } 213. }); 214. } 215.

216. }); // End of extend

[javascript] view plaincopy

1. //当鼠标滑到项目名称,计划字段的时候(LogText),显示任务内容的详细信息 2. /*

3. http://www.sencha.com/forum/showthread.php?59895-Ext.ux.plugins.grid.CellTo

olTips&highlight=Extjs+grid+Tip 4. */

5. var cellTips = new Ext.ux.plugins.grid.CellToolTips 6. ( 7. [

8. { field: 'ProjectName', tpl: '项目名称:{ProjectName}
责任

人:{LiabilityMan}
计划完成时间:{LogDate}
任务内容: {Remark}' }, 9. { field: 'LogText', tpl: '项目名称:{ProjectName}
责任

人:{LiabilityMan}
计划完成时间:{LogDate}
任务内容: {Remark}' } 10. ] 11. );

Grid中添加插件

[javascript] view plaincopy

1. var grid = new Ext.grid.GridPanel 2. ({

3. id: \, 4. title: '任务列表', 5. renderTo:\, 6. layout: \, 7. width: \, 8. autoHeight: true, 9. frame: true, 10. border: true, 11. columnLines: true, 12. autoScroll: true,

13. loadMask: {msg:'正在加载数据,请稍侯……'}, 14. store: store, 15. sm: sm, 16. cm: cm,

17. plugins: [ cellTips ]//这是这个代码 18. ... 19. })


Extjs Grid 中的 ToolTip效果(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:六年级语文下册期末试卷

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: