如何在调整表格单元格大小时换行? [英] How to Wrap Text while Resizing the Table Cells?

查看:91
本文介绍了如何在调整表格单元格大小时换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当内容大于单元格的大小时,如何在表单元格中使用WrapText. (在调整单元格大小时)

请参考以下链接:

http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx [ ^ ]

我已经在上面的链接(Telerik Grid示例)中看到了这一点.

请参阅-不包装单元格内容"选项(选择和取消选择以查看区别)

How to WrapText with in the table cells while content is larger than the size of the cells. (At the Time of Resizing the Cells)

please refer the below link:

http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx[^]

I have seen this in the above link(Telerik Grid samples).

Please refer - No wrap for cell content option(Select and Deselect to see the difference)

推荐答案

不是很明显:您可以适合单元格到字符串还是将文本换成字符串的大小?它取决于表的大小和用于单元格的td标记类的样式的size属性.如果未指定大小,则渲染引擎将尝试调整单元格以适合所有字符串.如果字符串不可断裂,则会发生这种情况,这可以通过使用nobr标记,样式white-space: nowrap;或不间断空格字符 来实现.

—SA
Isn''t that obvious: you can either fit the size of the cell to the string or wrap the text to the size of the string? It depends on the size of the table and size attribute of the style for the class of the td tag used for the cell. If you don''t specify size, the rendering engine tries to adjust cells to fit all the strings. It happens if the string is not breakable, which you can achieve by using nobr tag, the style white-space: nowrap; or non-breaking space character  .

—SA


这篇关于如何在调整表格单元格大小时换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆