views:

26

answers:

1

I have a gridview which in one column is displaying MAC addresses. Instead of displaying them in one row, its putting them in a column as wide as the "MAC" header column. If I remove the "-"'s, then it extends the column width and displays it as one row. Is there any way to have this happen with the "-"'s included?

Field in question looks like so:

<asp:TemplateField HeaderText="MAC" SortExpression="MAC">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MAC") %>' 
       Wrap="False"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>

<asp:Label ID="Label3" runat="server" Text='<%# Bind("MAC") %>'
                                        Wrap="False"></asp:Label>
</ItemTemplate>
<FooterStyle Wrap="False" />
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:TemplateField>
A: 

How have you disabled wrap? Consider:

<asp:BoundField HeaderText="SomeGuid" 
                DataField="SomeGuid" 
                ItemStyle-Wrap="false" />

Does the column or grid have enough room to fit unwrapped?

p.campbell
Modified original question. I've ever tried setting the width to something like 1000 and it doesn't respond to that either.
Shawn