在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. apache加入chkconfig

    #First Step: cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd #Second Step: vim /etc/init.d/htt ...

  2. UVALive 6426

    UVALive 6426 /** 题意:给一个n*m的矩阵,求某一个区间的数的数量 做法:刚开始想用树状数组,但是RE,题目中说数据是从二进制流中读入, 用scanf会挂掉 所以用fread 读入 s ...

  3. [PAT] 1021 Deepest Root (25)(25 分)

    1021 Deepest Root (25)(25 分)A graph which is connected and acyclic can be considered a tree. The hei ...

  4. C入门之一

    1.stdio.h不要写错成studio.h 2. #include <stdio.h> int main() { /* 我的第一个 C 程序 */ printf("Hello, ...

  5. redis之(十九)redis的管理

    [一]redis的安全 --->redis的简洁美,使得redis的安全设计是在“redis运行在可信环境”这个前提下做出来,. --->在生产环境运行时不能允许外界直接链接到redis, ...

  6. APP线上问题收集信息整理

    常话说“软件是不能保证百分百没有bug的”,因此当我们的APP上线之后,市场的使用人员会反馈一些我们测试人员可能在测试时遗漏的问题,包括也不防会有一些需求的反馈,这些问题均由售后人员反馈整理,以一种方 ...

  7. python webpy 框架环境架设

    前几年使用过 webpy做个些小东西,今天有个东西从拾webpy.但是基本上都忘记了,还是那句古话“好记性不如烂笔头”.这里把相应的步骤梳理下. 前提: 操作系统 windows 一.webpy 方面 ...

  8. AC日记——[HNOI2008]玩具装箱toy bzoj 1010

    1010 思路: 斜率优化DP: 跪烂大佬 代码: #include <bits/stdc++.h> using namespace std; #define maxn 50005 #de ...

  9. (翻译)Xamarin.Essentials 最新预览版的更多跨平台 API

    原文地址:https://blog.xamarin.com/cross-platform-apis-xamarin-essentials-latest-preview/ 在 Microsoft Bui ...

  10. cookie笔记(二)

    小荔枝 增 删 查 改 <form action="javascript:void(0)" method="get" accept-charset=&qu ...