网格视图 [英] Grid view
问题描述
我要在网格视图中输入描述表,它会随着描述扩展并影响其他列.是否固定了大小和高度? :)
我有一个带有3列的GridView
-Name
-Address
-Description
当我将其与数据绑定时,如果Description
列的文本多于我指定的宽度,则它将扩展并移动/更改其他列的大小.
现在,如何使所有3列的宽度固定为宽度.
请帮助我解决此问题.
谢谢.
i am enter the description table in grid view it expand with the description and effecting the other columns.Even i fixed the size and height ? :)
I have a GridView
with 3 Columns
- Name
- Address
- Description
When I bind it with the data, and If the Description
column has more text than the width I have specified, It expands and move/change size of other columns.
Now, how can I make the width of all the 3 columns fixed width.
Please help me to fix this problem.
Thank You.
推荐答案
您可以在设计时使用width=<some value>
设置gridview列的宽度.
或者,您可以像此 [
You can set the gridview column width at design time usingwidth=<some value>
Or, you set the width dynamically like this[^]
Am假设您在谈论winform gridview,然后在gridview的列编辑器(columns属性)中,有一个名为"AutoSizemode"的属性,用于控制数据填充列的方式...
Am assuming you are talking about winform gridview, then in the columns editor(columns property) of the gridview there is a propert called "AutoSizemode" property that controls how the data fills the columns ...
有解决方案, Item-style-Align属性
There is solution that Item-style-Align property
这篇关于网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!