Column won't resize in datagrid

V

VB Programmer

I cannot get my first 2 columns to adhear to my width settings. Any ideas?

The datagrid is defined as:

<asp:DataGrid id="dgLog" runat="server" Width="990px" Height="96px"
BorderColor="#999999" BorderStyle="None"
BorderWidth="1px" BackColor="White" CellPadding="3"
Font-Names="Verdana" AutoGenerateColumns="False"
GridLines="Vertical" Font-Size="X-Small">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<HeaderStyle Font-Names="Verdana" Font-Bold="True"
HorizontalAlign="Center" ForeColor="White"
BackColor="#000084"></HeaderStyle>
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="EmailSent" HeaderText="Date Time">
<HeaderStyle Width="150px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Subject" HeaderText="Subject">
<HeaderStyle Width="250px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Recipients" HeaderText="Recipients">
<HeaderStyle Width="250px"></HeaderStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</asp:DataGrid>
 
J

Juno

Hi,

I saw you set the width of datagrid to 990px, however you aslo defined each
columns' width(150px,250px,250px).
And 150+250+250 not equals to 990. So what are you want datagrid to be? :)
 
V

VB Programmer

I want it to match the indiv widths. Since the dg width is bigger does it
obsolete the others?
 
E

EasyDotNet Inc

Hi,

You can set width of datagrid to 100% and only set width of two columns
of three.


:)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top