【发布时间】:2013-01-29 20:49:48
【问题描述】:
我不能让这个 GridView 列改变它的宽度,我试过这个:
<asp:BoundField DataField="ABC" HeaderText="ABC" SortExpression="ABC" ControlStyle-Width="200%">
或以像素为单位:
<asp:BoundField DataField="ABC" HeaderText="ABC" SortExpression="ABC" ControlStyle-Width="500px">
或者这个在Boundfield标签里面:
<ItemStyle HorizontalAlign="Center" Width="500px"/>
也在代码隐藏上试过这个:
Protected Sub GridView3_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView3.RowDataBound
e.Row.Cells(7).Width = 500
End Sub
我怎样才能做到正确?
【问题讨论】:
标签: asp.net vb.net gridview width