T
TB
According to Microsoft (
http://support.microsoft.com/default.aspx?scid=kb;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="MySQLDataGrid" PageSize="6" DataKeyField="ID"
autogeneratecolumns="False" AlternatingItemStyle-BackColor="#C0C0C0"
AllowPaging="True" OnPageIndexChanged="PageChange"
HeaderStyle-BackColor="#88B5DA" Width="100%"
runat="server">
<SelectedItemStyle BackColor="Gold"></SelectedItemStyle>
<EditItemStyle CssClass="MyListitem"></EditItemStyle>
<AlternatingItemStyle BackColor="Silver"></AlternatingItemStyle>
<ItemStyle CssClass="myListItem"></ItemStyle>
<HeaderStyle CssClass="myListItem" BackColor="#88B5DA"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="name" HeaderText="name">
<HeaderStyle Wrap="False" Width="40px"></HeaderStyle>
<ItemStyle Wrap="False" Width="40px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="position" HeaderText="position">
<HeaderStyle Wrap="False" Width="90px"></HeaderStyle>
<ItemStyle Wrap="False" Width="90px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="note1" HeaderText="note 1Regarding">
<HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
<ItemStyle Wrap="False" Width="200px" Height="15px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="note2" HeaderText="note 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
http://support.microsoft.com/default.aspx?scid=kb;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="MySQLDataGrid" PageSize="6" DataKeyField="ID"
autogeneratecolumns="False" AlternatingItemStyle-BackColor="#C0C0C0"
AllowPaging="True" OnPageIndexChanged="PageChange"
HeaderStyle-BackColor="#88B5DA" Width="100%"
runat="server">
<SelectedItemStyle BackColor="Gold"></SelectedItemStyle>
<EditItemStyle CssClass="MyListitem"></EditItemStyle>
<AlternatingItemStyle BackColor="Silver"></AlternatingItemStyle>
<ItemStyle CssClass="myListItem"></ItemStyle>
<HeaderStyle CssClass="myListItem" BackColor="#88B5DA"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="name" HeaderText="name">
<HeaderStyle Wrap="False" Width="40px"></HeaderStyle>
<ItemStyle Wrap="False" Width="40px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="position" HeaderText="position">
<HeaderStyle Wrap="False" Width="90px"></HeaderStyle>
<ItemStyle Wrap="False" Width="90px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="note1" HeaderText="note 1Regarding">
<HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
<ItemStyle Wrap="False" Width="200px" Height="15px"></ItemStyle>
<FooterStyle Wrap="False"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="note2" HeaderText="note 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