Increase Width of GridView Column

Discussion in 'ASP General' started by dmbuso, Aug 24, 2008.

  1. dmbuso

    dmbuso Guest

    How do I increase the default width of a gridview column (just one column,
    the 10th column, named "Notes")?

    In design mode, I changed the width properties of the HeaderStyle,
    ControlStyle, and ItemStyle to 300 px and set Wrap to False for the
    HeaderStyle and ItemStyle. When I accept settings the "Notes" field widens in
    design mode but when I run the web site, the Notes field is back to default
    width.

    PS - My gridview is bound to SqlDataSource1 which is a SELECT statement to a
    SQL Server 2005 database table.

    --
    Dave B.
    dmbuso, Aug 24, 2008
    #1
    1. Advertising

  2. dmbuso wrote:
    > How do I increase the default width of a gridview column (just one
    > column, the 10th column, named "Notes")?
    >
    > In design mode, I changed the width properties of the HeaderStyle,
    > ControlStyle, and ItemStyle to 300 px and set Wrap to False for the
    > HeaderStyle and ItemStyle. When I accept settings the "Notes" field
    > widens in design mode but when I run the web site, the Notes field is
    > back to default width.
    >
    > PS - My gridview is bound to SqlDataSource1 which is a SELECT
    > statement to a SQL Server 2005 database table.


    There was no way for you to know it (except maybe by browsing through some
    of the previous questions in this newsgroup before posting yours - always a
    recommended practice) , but this is a classic (COM-based) asp newsgroup.
    ASP.Net bears very little resemblance to classic ASP so, while you may be
    lucky enough to find a dotnet-knowledgeable person here who can answer your
    question, you can eliminate the luck factor by posting your question to a
    group where those dotnet-knowledgeable people hang out. I suggest
    microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Aug 24, 2008
    #2
    1. Advertising

  3. dmbuso

    dmbuso Guest

    Sorry, I will post this to the microsoft.public.dotnet.framework.aspnet
    newsgroup.
    --
    Dave B.
    dmbuso, Aug 24, 2008
    #3
    1. Advertising

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.
Similar Threads
  1. dmbuso

    Increase Gridview Column Width

    dmbuso, Aug 24, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    579
    Munna
    Aug 25, 2008
  2. Replies:
    0
    Views:
    915
  3. Sivaraman.S

    How to increase or decrease the width of the column in datagrid

    Sivaraman.S, Oct 18, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    165
    Scott Mitchell [MVP]
    Oct 18, 2004
  4. Carl Howarth

    DG Column Width vs Table Column Width

    Carl Howarth, Oct 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    256
    Eliyahu Goldin
    Oct 24, 2004
  5. Replies:
    1
    Views:
    1,517
Loading...

Share This Page