T
tshad
I have a GridView that I want to control all the columns widths except for
1.
Most of them seem to work that way except for this one:
<asp:TemplateField ItemStyle-CssClass="alignRight"
SortExpression="GiftAmount" HeaderStyle-Width="100px" HeaderText="Gift">
<ItemTemplate>
<asp:Label ID="lblGiftAmount" runat="server"
SortExpression="GiftAmount" Width="100px" Text='<%#
Eval("GiftAmount","{0:c}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtGiftAmount" runat="server" Width="100px" Text='<%#
Eval("GiftAmount","{0:###,###.00}") %>' />
</EditItemTemplate>
</asp:TemplateField>
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?
Thanks,
Tom
1.
Most of them seem to work that way except for this one:
<asp:TemplateField ItemStyle-CssClass="alignRight"
SortExpression="GiftAmount" HeaderStyle-Width="100px" HeaderText="Gift">
<ItemTemplate>
<asp:Label ID="lblGiftAmount" runat="server"
SortExpression="GiftAmount" Width="100px" Text='<%#
Eval("GiftAmount","{0:c}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtGiftAmount" runat="server" Width="100px" Text='<%#
Eval("GiftAmount","{0:###,###.00}") %>' />
</EditItemTemplate>
</asp:TemplateField>
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?
Thanks,
Tom