Results 1 to 2 of 2

Thread: Datagrid Column Widths

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Posts
    1

    Datagrid Column Widths

    I'm stuck trying to set widths for individual columns in a datagrid filled from a datatable.

    Any help would be appreciated.

  2. #2
    Addicted Member
    Join Date
    Aug 2001
    Location
    Pennsylvania
    Posts
    133

    Col. Rezize

    PHP Code:

    'The important line of code for me was inititializing the the datagrid. The datagrid can be more than 100%.

     dg.Width = Unit.Percentage(300)


    '
    Then when you create your columns you can specifiy the percentage of 300 you want.

     
    dg.Columns(0).ItemStyle.Width Unit.Percentage(2)

    'In this case column 0 is 2% or the 300 total width 

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