我正在使用网格视图,并且我需要每当任何列包含比其宽度长的文本时,它都应该换行,或者它应该在新行中显示文本的另一部分。下面是网格视图代码:
<asp:GridView ID="GridView1" AllowSorting="True" runat="server"
onsorting="GridView1_Sorting" AllowPaging="True" PageSize="6" CellPadding="4"
onpageindexchanging="GridView1_PageIndexChanging"
onrowdatabound="GridView1_RowDataBound" ForeColor="#333333"
GridLines="Vertical">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle Wrap="false" BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle Wrap="false" BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>