我有以下代碼。我爲footerstyle,rowstyle和headerstyle設置了width="150px"
。修復了gridview列的寬度不起作用。
代碼:
<strong>Title</strong><br />
<asp:GridView ID="socGridView" runat="server"
CaptionAlign="Top" HorizontalAlign="Justify"
DataKeyNames="id" onselectedindexchanged="socGridView_SelectedIndexChanged"
ToolTip="Excel FIle DownLoad Tool" CellPadding="4" ForeColor="#333333"
GridLines="None">
<RowStyle width = "150px" BackColor="#E3EAEB" />
<Columns>
<asp:CommandField ShowSelectButton="True" SelectText="Download" ControlStyle-ForeColor="Blue"/>
</Columns>
<FooterStyle width = "150px" BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle width = "150px" BackColor="Gray" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
但是,它不me.Is那裏工作的任何方式來解決這個問題?
retagged,這是asp.net,不是經典的asp – 2013-03-21 08:29:40