AutoResize GridView列宽度根据其内容 [英] AutoResize GridView Columns width According To Their Contents

查看:87
本文介绍了AutoResize GridView列宽度根据其内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找这个问题的答案,并没有找到我想要的东西。我有一个包含5列的GridView。其中一列是一个非常长的字符串而不是。我需要能够修复列的宽度,并使用自动换行处理字符串直到它结束。我已经尝试了gridview上的所有属性来获得我需要的东西,但是跨度总是水平伸展而且永远不会包裹。

如果他们有任何方法来自动调整Gridview的Columns宽度。

如果有任何建议。

解决方案

尝试



creating-max-width-for-gridview-column-and-wrap-text [ ^ ]



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


GridView AutoSize列 [ ^ ]。



您需要使用 ItemStyle 属性 GridView 列。

I have been looking for an answer to this for awhile and haven't found what I am looking for. I have a GridView with 5 columns. One of those columns is a very long string with instead of " ". I need to be able to fix the width of the column and have word wrap take care of the string till the end of it. I have tried all the properties on the gridview to get what I need but the span always stretches out horizontally and never wraps.
If their is any way to autosize the Columns width of Gridview .
If any please suggest .

解决方案

Try

creating-max-width-for-gridview-column-and-wrap-text[^]

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


Check the accepted answers at GridView AutoSize Columns[^].

You need to use ItemStyle attribute of GridView Column.


这篇关于AutoResize GridView列宽度根据其内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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