Results 1 to 3 of 3

Thread: automatic column width for datagrids - how ?

  1. #1

    Thread Starter
    Hyperactive Member fabianus's Avatar
    Join Date
    Sep 2004
    Location
    Paris
    Posts
    402

    Question automatic column width for datagrids - how ?

    I use a collection for dataSource of a datagrid. Now I want that the columns are automatically dimensioned so that all data is visible. Is there any way to do this?

    Otherwise, how may I define the width of the columns (after or befor binding with the datasource).

    Thank you very much for any help !

    Regards,
    Fabian

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: automatic column width for datagrids - how ?

    with listview I think it works if you set the column width to -1
    try it with datagrid, maybe it works the same
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: automatic column width for datagrids - how ?

    create a datagridtablestyle and set their textboxcolumns width to 0.

    sample: http://vbforums.com/showthread.php?t...gridtablestyle

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