在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. [ Python ] 基本数据类型及属性(上篇)

    1. 基本数据类型 (1) 数字 - int        (2) 字符串 - str        (3) 布尔值 - bool 2. int 类型中重要的方法 (1) int      将字符串转 ...

  2. 高德地图web 端智能围栏

    最近有个项目,需要在web上批量给设备设置智能围栏,设备超出范围报警,查看高德地图webJS API,web端操作案例如,后台判断没有提供源码 <!-- 重点参数:iconStyle --> ...

  3. Python五子棋的小程序

    代码是在开源中国上看到的,源代码网址:http://www.oschina.net/code/snippet_2365439_48010 需要安装graphics模块,下载地址:http://mcsp ...

  4. VS的使用

    配置一个工程 问题描述: 要运行一个源码工程,工程中含有层级目录,.cpp与.h在多级目录中混合存储.并且该工程的运行依赖一些静态库(.lib)与动态库(.dll). 建立: 把.h拷贝至$(Proj ...

  5. MVC - 13.验证

    1.注解验证-Required-StringLength-Range-Regular. 1.1.验证方式 [Required], [StringLength], [Range], 和 [Regular ...

  6. SnagIt截图后无法在编辑器打开,不显示截图内容的解决办法(转)

    方法1: 用SnagIt截图后,弹出的编辑器里不显示刚才截图的内容,解决办法如下: 完全退出Snagit和编辑器,删除以下文件夹: Win7用户 C:\Users\Administrator\AppD ...

  7. 如何简单的测试kubernetes的dns add-ons是否工作正常?

    1,新建一个yaml文件. apiVersion: v1 kind: Pod metadata: name: busybox namespace: default spec: containers: ...

  8. AC日记——魔法森林 洛谷 P2387

    魔法森林 思路: spfa水过(正解lct); 代码: #include <bits/stdc++.h> using namespace std; #define maxn 50005 # ...

  9. 如何配置Java环境,包括JDK,Maven等

    下载JDK并安装 搜索JDK,官网立马就出来了,下载之后个人觉得毕竟开发,毕竟这东西不大,C盘稳一点,安装在C盘可以的 配置 右键打开计算机->属性->高级系统设置->高级-> ...

  10. ASP.NET MVC 视图学习,纯干货

    最近用MVC专门为自己做了一个网站,用来记录文章心情和日记.加上和同事的一些交流感觉颇深.所以想把13年买的MVC 4高级编程重新看一遍,记录一些东西,以后应该用的到.视图总是被控制器渲染,因为控制器 ...