Results 1 to 4 of 4

Thread: Resize columns

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2012
    Posts
    49

    Resize columns

    How I can resize width of column to the end of the datagridview??
    Attached Images Attached Images  

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,350

    Re: Resize columns

    The grid itself has an AutoSizeColumnsMode property and each column has an AutoSizeMode property. You should read the applicable MSDN documentation to find out what you can do with them. It may be as simple as using Fill for the last column, but there are other options too.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2012
    Posts
    49

    Re: Resize columns

    I resolve problem using:
    DataGridView1.Columns(0).Width

  4. #4
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: Resize columns

    I would really advise you to follow the advise offered by jmcilhinney. Here are the relevant links.

    DataGridView.AutoSizeColumnsMode Property

    DataGridViewAutoSizeColumnsMode Enumeration

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width