Changing the with of an unbound datagrid

Discussion in 'ASP .Net Datagrid Control' started by Kevin Humphreys, Dec 22, 2005.

  1. Hi,
    I have a basic datagrid. But I want to change the width of one of the
    columns. The problem is all of the columns are the same width.
    I am using an unbound datagrid being filled by a dataset.

    Can you help?

    Thanks In Advance,

    Kevin.
    Kevin Humphreys, Dec 22, 2005
    #1
    1. Advertising

  2. Kevin Humphreys

    Elton Wang Guest

    Hi Kevin,





    I assume that you are using AutoGenerateColumns="True" to bind the datagrid.
    If so, you can set width of each column. In order to control width of
    column, you need to apply AutoGenerateColumns="False". Then create either
    Bound Column or Template Column for each data field and assign
    HeaderStyle-Width and ItemStyle-Width values.


    HTH



    "Kevin Humphreys" <> wrote in message
    news:...
    > Hi,
    > I have a basic datagrid. But I want to change the width of one of the
    > columns. The problem is all of the columns are the same width.
    > I am using an unbound datagrid being filled by a dataset.
    >
    > Can you help?
    >
    > Thanks In Advance,
    >
    > Kevin.
    >
    >
    Elton Wang, Dec 24, 2005
    #2
    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. =?Utf-8?B?QmFsYQ==?=

    unbound datagrid

    =?Utf-8?B?QmFsYQ==?=, Dec 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,495
    =?Utf-8?B?QmFsYQ==?=
    Dec 28, 2004
  2. Replies:
    0
    Views:
    388
  3. Eddie B.

    Hide UNBOUND datagrid cols?

    Eddie B., Oct 21, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    149
    Alvin Bruney
    Oct 21, 2003
  4. .NetNewbie

    access textbox values that are unbound in datagrid

    .NetNewbie, Jul 25, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    132
    Elton Wang
    Jul 25, 2005
  5. Gary Frank

    Bound datatable + unbound column in datagrid

    Gary Frank, Aug 25, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    207
    Elton Wang
    Aug 25, 2005
Loading...

Share This Page