在datagrid中添加一句,DataGrid属性中的nowrap:false。

(默认为true)。

JS文件:

$('#_main_table').datagrid({
method:'get',
url: 'xxxxx',
checkbox:true,
pagination: true,
fit: true,
cache:false,
fitColumns: true,
border: false,
rownumbers: true,
nowrap:false,
frozenColumns:[[
{field:'id',checkbox:true,hidden:true}
]],
loadFilter: function(data) { return data.data;
},
});

效果图:

参见,  HTML <td> 标签的 nowrap 属性

<html>
<body> <table border="1">
<tr>
<th>Poem</th>
<th>Poem</th>
</tr>
<tr>
<td nowrap="nowrap">Never increase, beyond what is necessary, the number of entities required to explain anything</td>
<td>Never increase, beyond what is necessary, the number of entities required to explain anything</td>
</tr>
</table> <p>在 HTML 4.01 中,不赞成使用 td 元素的 nowrap 属性;在 XHTML 1.0 Strict DTD 中,不支持 td 元素的 nowrap 属性。</p> </body>
</html>

转载于:http://www.w3school.com.cn/tags/att_td_nowrap.asp

easyui-datagrid列的数据内容过长自动换行的更多相关文章

  1. easyui datagrid 列隐藏和显示

    easyui datagrid 列隐藏和显示 用js怎么控制列的显示和隐藏?   最佳答案   $('#grid').datagrid('hideColumn','列field');把hideColu ...

  2. easyui datagrid 每条数据后添加操作按钮

    easyui datagrid 每条数据后添加“编辑.查看.删除”按钮 1.给datagrid添加操作字段:字段值 <table class="easyui-datagrid" ...

  3. js控制easyui datagrid列的显示和隐藏

    easyui datagrid 列隐藏和显示 $('#grid').datagrid('hideColumn','列field'); //把hideColumn换成showColumn 即为显示列

  4. 解决easyui datagrid加载数据时,checkbox列没有根据checkbox的值来确定是否选中

    背景:   昨天帮朋友做一个easyui datagrid的小实例时,才发现easyui datagrid的checkbox列,没有根据值为true或false来选中checkbox,当时感觉太让人失 ...

  5. 实现easyui datagrid在没有数据时显示相关提示内容

    本示例实现easyui datagrid加载/查询数据时,如果没有相关记录,则在datagrid中显示没有相关记录的提示信息,效果如下图所示 本实例要实现如下图所示的效果: 本示例easyui版本为1 ...

  6. easyui datagrid 列的内容超出所定义的列宽时,自动换行

    定义表单  nowrap="false"可以使得列中的内容超出所定义的列宽是就会自动换行pagination : true, // 当true时在DataGrid底部显示一个分页工 ...

  7. Easyui datagrid加载数据时默认全选的问题

    问题描述: 最近使用 Easyui datagrid 展示数据,之前一直使用很正常,今天出现了一个怪异问题 加载数据后,只要点击选中列 ck 的任意行或多行,再刷新时整个datagrid的所有数据都 ...

  8. 在easyui datagrid中formatter数据后使用linkbutton

    http://ntzrj513.blog.163.com/blog/static/2794561220139245411997/ formatter:function(value,rowData,ro ...

  9. 关于EasyUI datagrid 表头居中 数据列内容居右 或者居左

    cell.css("text-align",(col.halign||col.align||"")); 这里有个属性挺眼熟 : col.align 前面还有一个 ...

随机推荐

  1. 分割线用CSS样式做出来的效果

    一:单个标签实现分隔线:. ; ; line-height: 1px; border-left: 200px solid #ddd; border-right: 200px solid #ddd; t ...

  2. java的装饰设计模式

    类似python中的装饰器. 示例: public class Test5 { public static void main(String[] args) { Worker w = new Work ...

  3. linux命令行任务管理

    今天看到了linux命令行的任务管理命令感觉很实用: 1.ctrl+z  将当前前台执行的任务放到后台并暂停 2.fg恢复上次放入后台的任务 这两个命令组合起来很实用,比如在linux命令行中写pyt ...

  4. linux命令(32):free命令

    1.显示内存使用情况:free  free –g  free –m 2.以总和的形式显示内存的使用信息: free -t 3.周期性的查询内存使用信息:free -s 10

  5. [水煮 ASP.NET Web API2 方法论](1-6)Model Validation

    问题 想要 ASP.NET Web API 执行模型验证,同时可以和 ASP.NET MVC 共享一些验证逻辑. 解决方案 ASP.NET Web API 与 ASP.NET MVC 支持一样的验证机 ...

  6. NHibernate框架与BLL+DAL+Model+Controller+UI 多层架构十分相似--『Spring.NET+NHibernate+泛型』概述、知识准备及介绍(一)

    原文://http://blog.csdn.net/wb09100310/article/details/47271555 1. 概述 搭建了Spring.NET+NHibernate的一个数据查询系 ...

  7. Web页面中两个listbox的option的转移

    Html: <div><span>所选时间:</span><select id="xuanyongTimelb" style=" ...

  8. 读书笔记(高性能javascript)(一)

    1.加载与执行: (1)将脚本放在底部:(否则会阻塞) (2)由于每个<script>标签初始下载时都会阻塞页面渲染,所以减少页面包含的<script>标签数量有助于改善这一情 ...

  9. 图论&双连通分量&强联通分量&2-SAT

    图论入门费: 数据小,大胆的写 https://vjudge.net/problem/UVA-10047 入门费 https://vjudge.net/problem/UVA-11624 思维,建图异 ...

  10. Linux系统的目录结构及各目录作用

    使用tree命令查看Linux目录结构,这个命令默认是没有安装的,需要手动安装一下. [root@xuexi xf]# mount /dev/sr0 /media/ mount: /dev/sr0 写 ...