我尝试了不同的方法来设置我的 gridview clumns 的宽度,但对我来说没有任何效果。有人可以指导我如何实现这一目标。我在下面包括我的代码...
谢谢。
<SharePoint:SPGridView ID="gvSearchResults" EnableViewState="true" runat="server"
AlternatingRowStyle-BackColor="#f4f8fd" AllowSorting="true" DataKeyNames="ID"
AutoGenerateColumns="false" OnSorting="gvxxxResults_Sorting" OnPageIndexChanging="gvxxxResults_PageIndexChanging">
<Columns>
<asp:HyperLinkField HeaderText="Name" DataTextField="FileLeafRef"
DataNavigateUrlFields="FileLeafRef" Target="_parent" DataNavigateUrlFormatString="/pp/ll/lp/llDocs/{0}"
ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Wrap="false"
SortExpression="Name" ItemStyle-Width="50px" />
<asp:BoundField DataField="Home_x0020_Number" HeaderText="Home Number" NullDisplayText=" " SortExpression="Home_x0020_Number">
<HeaderStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
<ItemStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Phone_x0020_Number" HeaderText="Phone Number" NullDisplayText=" " SortExpression="Phone_x0020_Number">
<HeaderStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
<ItemStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
</SharePoint:SPGridView>