datagrid中用tooltip
function msgFormat(value,row){
value = value.replace(/ /g," ");
return '<span title='+ value +' class="easyui-tooltip">'+value+'</span>';
}
当datagrid中的value过长时,可以使用tooltip显示完全
当tooltip的title中有空格时我们发现 鼠标移入只显示空格以前的部分,为了让value显示完全,用replace方法把空格用 来替换
formatter之后我们发现返回的标签并没有作用,需要在datagrid loadSuccess之后重新申明一下tooltip
$(".easyui-tooltip").tooltip({
onShow: function () {
$(this).tooltip('tip').css({
marginLeft: '-45px',
borderColor: 'blue'
});
}
});
直接写
$(".easyui-tooltip").tooltip()也是可以的
datagrid中用tooltip的更多相关文章
- Datagrid方法扩展 - tooltip
最新版本的jQuery Easyui新出来了一个组件叫tooltip,就是提示框.以前的版本没有这个组件的时候就有很多在问,datagrid的单元格,我要加鼠标提示要怎么做.原来我告诉他们的方法都是用 ...
- easyui combobox 在datagrid中动态加载数据
场景:datagrid 中用编辑框修改数据,有一个列使用的combobox 在可编辑的时候需要动态绑定数据,这个数据是在根据其他条件可变的 思路:在每次开启编辑框的时候动态绑定数据, datagri ...
- Code Project精彩系列(转)
Code Project精彩系列(转) Code Project精彩系列(转) Applications Crafting a C# forms Editor From scratch htt ...
- [easyui] - 在easyui的table中展示提示框
因为在easyui的table中字段过多,而无法展示全时,被迫只能使用这个方法. 使用方式: 在 $('#dg').datagrid({ 后的 queryParams: form2Json('sear ...
- EasyUI TreeGrid 悬浮效果
/* 鼠标悬停扩展*/ (function (hasgrid) { if (hasgrid) { /** * 表格提示 */ $.extend($.fn.datagrid.methods, { too ...
- 基于1.3.3版本tooltip的datagrid单元格tip实现
基于1.3.3版本tooltip的datagrid单元格tip实现 2013年05月25日 ⁄ datagrid ⁄ 共 6122字 ⁄ 评论数 26 ⁄ 被围观 7,033 views+ 文章目录 ...
- 让easyui datagrid支持bootstrap的tooltip
让easyui datagrid支持bootstrap的tooltip 发表于 下午 1:53 by ylpro.net & 分类 Java. Easyui在1.3.3版本之前是不支持tool ...
- easyui datagrid tooltip
$('#dg').datagrid('getPanel').find('.easyui-tooltip').each(function(){ var index = parseInt($(this). ...
- [转]silverlight Datagrid 行上增加ToolTip
有两种办法: 1. 直接在后台处理在数据绑定后 ,注册LoadingRow 事件this.DataGrid.LoadingRow += new EventHandler<DataGridRowE ...
随机推荐
- CCCallFunc, CCCallFuncN, CCCallFuncND 三者的区别
今天学习过程中,自己敲了一个例子,结果在执行Action的时候出现了错误.经排查发现是CCCallFunc使用的问题,应该使用CCCallFuncN,然后搜了下他们的区别,才知道,是因为有一个参数的问 ...
- Java 语言基础之语句
程序的四种流程控制结构: 顺序结构 判断结构 : if 语句 选择结构 : switch 语句 循环结构 : while 语句, do...while 语句, for 语句 以下主要分析循环结构: w ...
- Python(数据库之表操作)
一.修改表 1. 修改表名 ALTER TABLE 表名 RENAME 新表名; #mysql中库名.表名对大小写不敏感 2. 增加字段 ALTER TABLE 表名ADD 字段名 数据类型 [完整性 ...
- smtplib与email模块(实现邮件的发送)
SMTP是发送邮件的协议,Python内置对SMTP的支持,可以发送纯文本邮件.HTML邮件以及带附件的邮件. Python对SMTP支持有smtplib和email两个模块,email负责构造邮件, ...
- C++中的默认成员函数
一般而言,对于一个用户自定义的类类型,以下四个函数在用户没有自定义的情形下,会由编译器自动生成: 1.default constructor 2.copy constructor Someclass: ...
- oracle ORA-01704: string literal too long
导出数据时,在SQL拼接处,提示 oracle ORA-01704: string literal too long sql: WITH already_in AS (SELECT distinct ...
- 在 ReportViewer 报表中使用表达式
from:http://www.cnblogs.com/jobin/articles/1152213.html 有些表达式在报表中很常用.其中包括更改报表中的数据外观的表达式.计算总数的表达式和更改报 ...
- hibernatetemplate find条件查询方法
一.find(String queryString); 示例:this.getHibernateTemplate().find("from bean.User"); 返回所有Use ...
- centos6.5系统python2.6升级到python3.6
1.安装必备的工具 wget:yum install wget gcc:yum install gcc zlib zlib-devel: yum install zlib zlib-devel -y ...
- PHP范例注册审核
<body> <h1>注册</h1> <form action="zcchuli.php" method="post" ...