According to Microsoft (
http://support.microsoft.com/default...b;EN-US;323169 ), there
is bug in the the datagrid control, causing content to wrap in the
columns of a datagrid eventhough HeaderStyle Wrap or the ItemStyle Wrap
property to False.
Following the advice in the same support article, I have modified my
datagrid to become the following:
<asp:datagrid id="MySQLDataGr id" PageSize="6" DataKeyField="I D"
autogeneratecol umns="False" AlternatingItem Style-BackColor="#C0C 0C0"
AllowPaging="Tr ue" OnPageIndexChan ged="PageChange "
HeaderStyle-BackColor="#88B 5DA" Width="100%"
runat="server">
<SelectedItemSt yle BackColor="Gold "></SelectedItemSty le>
<EditItemStyl e CssClass="MyLis titem"></EditItemStyle>
<AlternatingIte mStyle BackColor="Silv er"></AlternatingItem Style>
<ItemStyle CssClass="myLis tItem"></ItemStyle>
<HeaderStyle CssClass="myLis tItem" BackColor="#88B 5DA"></HeaderStyle>
<Columns>
<asp:BoundColum n DataField="name " HeaderText="nam e">
<HeaderStyle Wrap="False" Width="40px"></HeaderStyle>
<ItemStyle Wrap="False" Width="40px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="posi tion" HeaderText="pos ition">
<HeaderStyle Wrap="False" Width="90px"></HeaderStyle>
<ItemStyle Wrap="False" Width="90px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="note 1" HeaderText="not e 1Regarding">
<HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
<ItemStyle Wrap="False" Width="200px" Height="15px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="note 2" HeaderText="not e 2">
<HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
<ItemStyle Wrap="False" Width="200px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn >
</Columns>
<PagerStyle Font-Size="Small"></PagerStyle>
</asp:datagrid>
However, the text still wraps in those columns. What am I missing here?
Any advice will be highly appreciated.
Thanks
TB