如何在gridview单元格中断行 [英] How to Break line in gridview cell

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

问题描述

hi


我在gridview中的数据库表中显示Description列。它以单行显示,但我希望以多行显示。我可以这样做吗?

解决方案

GridView在客户端呈现为HTML表格。只需在字符串中的适当位置(比如每15个字符)插入换行符

< br> 

。参考:

http:// stackoverflow.com/questions/4029875/how-to-wrap-text-in-boundfield-column-in-gridview [ ^ ]


试试 -

 itemstyle-wrap =True; 





希望,它会有所帮助:)


hi
I am displaying Description column from database Table in gridview. It display in single line but I want to display it in multiple line.how Can I do?

解决方案

GridView is rendered as HTML table on client-side. Just insert the line break

<br>

at the appropriate point (say every 15 characters) in the string. Refer:
http://stackoverflow.com/questions/4029875/how-to-wrap-text-in-boundfield-column-in-gridview[^]


Try-

itemstyle-wrap="True";



Hope, it helps :)


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

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