GridView column expanding

Discussion in 'ASP .Net' started by tshad, Oct 2, 2009.

  1. tshad

    tshad Guest

    I have a GridView that I want to control all the columns widths except for

    Most of them seem to work that way except for this one:

    <asp:TemplateField ItemStyle-CssClass="alignRight"
    SortExpression="GiftAmount" HeaderStyle-Width="100px" HeaderText="Gift">
    <asp:Label ID="lblGiftAmount" runat="server"
    SortExpression="GiftAmount" Width="100px" Text='<%#
    Eval("GiftAmount","{0:c}") %>'></asp:Label>
    <asp:TextBox ID="txtGiftAmount" runat="server" Width="100px" Text='<%#
    Eval("GiftAmount","{0:###,###.00}") %>' />

    I have the Header, Item and Textbox are all set to 100px.

    The Grid is set to 100%.

    As I expand the grid, this column expands as well. I have another column
    that has no size.

    Shouldn't that be the only one that expands?

    How do I get this column not to expand?


    tshad, Oct 2, 2009
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page