I am using this approach (shown by Jennifer above) to achieve a fixed column width because the methods shown in other threads aren't working for me.
With this approach, I am able to set the minimum width. But when the text is longer than that, the width expands. I am not able to make the text in the label control wrap.
My code is:
<asp:TemplateColumn HeaderText="TA" ItemStyle-Width=100 ItemStyle-Wrap=True SortExpression="TArea">
<ItemTemplate>
<asp:Label Width=100 id="TA" runat="server"
Text='<%# DataBinder.Eval(Container.DataItem, "TArea") %>' />
</ItemTemplate>
</asp:TemplateColumn>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.