How to auto resize the columns of a gridview after loading the data

Discussion in 'ASP .Net' started by Robson Siqueira, May 1, 2007.

  1. Hi,

    I would like to auto resize the columns of a grid view after loading the
    data. This would be basically performed using the largest size of each
    column, based on the data it contains.

    Do you guys know any way of doing this? This is pretty straight forward in
    Windows. But it looks a little bit complicate when doing it on web.

    Thanks,

    Robson Siqueira
     
    Robson Siqueira, May 1, 2007
    #1
    1. Advertisements

  2. Robson Siqueira

    bruce barker Guest

    Re: How to auto resize the columns of a gridview after loading thedata

    this is the behavior if don't set style widths. if you want to do it in
    code, then its done with client script. pick up any good javascript book
    and it should give you the info.

    -- bruce (sqlwork.com)



    Robson Siqueira wrote:
    > Hi,
    >
    > I would like to auto resize the columns of a grid view after loading the
    > data. This would be basically performed using the largest size of each
    > column, based on the data it contains.
    >
    > Do you guys know any way of doing this? This is pretty straight forward in
    > Windows. But it looks a little bit complicate when doing it on web.
    >
    > Thanks,
    >
    > Robson Siqueira
    >
    >
     
    bruce barker, May 1, 2007
    #2
    1. Advertisements

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. Boki
    Replies:
    5
    Views:
    633
  2. Jason
    Replies:
    3
    Views:
    17,513
    Jan Hyde
    May 8, 2006
  3. Jacksm
    Replies:
    2
    Views:
    1,141
    Paul Chalekian
    Nov 21, 2006
  4. =?Utf-8?B?cm9kY2hhcg==?=

    gridview auto columns

    =?Utf-8?B?cm9kY2hhcg==?=, May 31, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    629
    =?Utf-8?B?cm9kY2hhcg==?=
    May 31, 2007
  5. Pavel Tsekov
    Replies:
    0
    Views:
    309
    Pavel Tsekov
    Sep 14, 2006
  6. RBM
    Replies:
    1
    Views:
    271
  7. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    1,154
    Vinki
    Apr 25, 2007
  8. Replies:
    2
    Views:
    1,488
    Adrienne
    Feb 13, 2005
Loading...