Setting widths of columns

Discussion in 'ASP .Net Datagrid Control' started by Gary Paris, Oct 6, 2004.

  1. Gary Paris

    Gary Paris Guest

    I have a DataGrid on a Windows Form and I set the DataSource and DataMember.
    Data appears correctly. Question is how can I make certain columns wider to
    accomodate the fields. One field is ComapnyName and half of it gets
    truncated.

    Any help would be appreciated.

    Thanks,

    Gary
     
    Gary Paris, Oct 6, 2004
    #1
    1. Advertising

  2. Gary Paris

    Gary Paris Guest

    Re: Setting widths of columns - Anybody ???

    Since nobody answered, I guess it's too complicated or nobody else knows how
    to do it?

    Why do some posts get answered and others bypassed?


    "Gary Paris" <> wrote in message
    news:uk8BGJ$...
    >I have a DataGrid on a Windows Form and I set the DataSource and
    >DataMember. Data appears correctly. Question is how can I make certain
    >columns wider to accomodate the fields. One field is ComapnyName and half
    >of it gets truncated.
    >
    > Any help would be appreciated.
    >
    > Thanks,
    >
    > Gary
    >
    >
     
    Gary Paris, Oct 8, 2004
    #2
    1. Advertising

  3. Gary Paris

    Alex Homer Guest

    Re: Setting widths of columns - Anybody ???

    You said in your message that you were using a Windows Form, even though
    this is an ASP.NET (Web Forms) list. If you are using ASP.NET, there are
    some options for controlling the size of the cells in a DataGrid shown here:
    http://www.daveandal.net/books/6744/webforms/sizemulticontrolgrid.aspx
    http://www.daveandal.net/books/6744/webforms/scrollitemgrid.aspx

    Hope this helps...

    "Gary Paris" <> wrote in message
    news:...
    > Since nobody answered, I guess it's too complicated or nobody else knows

    how
    > to do it?
    >
    > Why do some posts get answered and others bypassed?
    >
    >
    > "Gary Paris" <> wrote in message
    > news:uk8BGJ$...
    > >I have a DataGrid on a Windows Form and I set the DataSource and
    > >DataMember. Data appears correctly. Question is how can I make certain
    > >columns wider to accomodate the fields. One field is ComapnyName and

    half
    > >of it gets truncated.
    > >
    > > Any help would be appreciated.
    > >
    > > Thanks,
    > >
    > > Gary
    > >
    > >

    >
    >
     
    Alex Homer, Oct 9, 2004
    #3
  4. Gary Paris

    DCatherman Guest

    Re: Setting widths of columns - Anybody ???

    Check out the DataGridColumnStyle class in helps. I have not figured
    everything out yet, but there is a .width property you can assign along
    with format and many other styles.

    Dave
     
    DCatherman, Oct 11, 2004
    #4
    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. Rachel Devons

    Setting column widths in DataList?

    Rachel Devons, Jun 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,053
    Eliyahu Goldin
    Jun 19, 2005
  2. =?Utf-8?B?U3RldmUgQnVnZGVu?=

    Setting GridVIew column widths at runtime

    =?Utf-8?B?U3RldmUgQnVnZGVu?=, Mar 6, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    18,608
    =?Utf-8?B?U3RldmUgQnVnZGVu?=
    Mar 7, 2006
  3. mark | r

    setting the widths of SPANS

    mark | r, Jul 5, 2004, in forum: HTML
    Replies:
    2
    Views:
    398
    Steve Pugh
    Jul 5, 2004
  4. Greg Smith

    Setting column widths in a GridView

    Greg Smith, Sep 28, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    753
    Greg Smith
    Sep 28, 2006
  5. jd
    Replies:
    2
    Views:
    126
    jdigital
    Dec 16, 2005
Loading...

Share This Page