Column won't resize in datagrid

Discussion in 'ASP .Net' started by VB Programmer, Sep 25, 2004.

  1. 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"
    <AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
    <ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
    <HeaderStyle Font-Names="Verdana" Font-Bold="True"
    HorizontalAlign="Center" ForeColor="White"
    <FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
    <asp:BoundColumn DataField="EmailSent" HeaderText="Date Time">
    <HeaderStyle Width="150px"></HeaderStyle>
    <asp:BoundColumn DataField="Subject" HeaderText="Subject">
    <HeaderStyle Width="250px"></HeaderStyle>
    <asp:BoundColumn DataField="Recipients" HeaderText="Recipients">
    <HeaderStyle Width="250px"></HeaderStyle>
    <PagerStyle HorizontalAlign="Center" ForeColor="Black"
    BackColor="#999999" Mode="NumericPages"></PagerStyle>
    VB Programmer, Sep 25, 2004
    1. Advertisements

  2. VB Programmer

    Juno Guest


    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? :)
    Juno, Sep 26, 2004
    1. Advertisements

  3. I want it to match the indiv widths. Since the dg width is bigger does it
    obsolete the others?
    VB Programmer, Sep 28, 2004
  4. Hi,

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

    EasyDotNet Inc, Sep 28, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.