aspx页面代码如下:
<asp:BoundField DataField="addstyle" HeaderText="标题" SortExpression="addstyle" >
<ItemStyle Width="15%" />
<HeaderStyle Width="15%" />
</asp:BoundField>
红色部分为调整列的宽度的代码。
本文介绍如何在ASP.NET的GridView控件中调整列的宽度。通过设置ItemStyle和HeaderStyle的Width属性来实现,例如将宽度设为15%。
aspx页面代码如下:
<asp:BoundField DataField="addstyle" HeaderText="标题" SortExpression="addstyle" >
<ItemStyle Width="15%" />
<HeaderStyle Width="15%" />
</asp:BoundField>
红色部分为调整列的宽度的代码。

被折叠的 条评论
为什么被折叠?