我不能让这个 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
我怎样才能正确?