Column Width of DetailsView

Discussion in 'ASP .Net Web Controls' started by Donald Hurley, Jun 24, 2006.

  1. How do you set the width of the columns in a detailview? The titles have way
    too much room, and I want to control that.

    Thanks,
    Don Hurley
    Donald Hurley, Jun 24, 2006
    #1
    1. Advertising

  2. Hi Don,

    Thank you for your post.

    Based on my understanding, your question is about how to set the field name
    column's width in DetailsView. Please feel free to post here if I've
    misunderstood anything.

    You can use the FieldHeaderStyle-Width property of DetailsView to control
    the first column's width of generated table. For example:

    <asp:DetailsView ID="DetailsView1" FieldHeaderStyle-Width="300px"
    runat="server" AutoGenerateRows="False" DataKeyNames="ProductID"
    DataSourceID="SqlDataSource1" Width="1000px" Height="50px">

    This will set the first column's width to 300px, and the other column's
    width will be 700px.

    Hope this helps. Please feel free to post here if anything is unclear.

    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Walter Wang [MSFT], Jun 26, 2006
    #2
    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. AndrewF
    Replies:
    1
    Views:
    773
    Bruce Barker
    Oct 10, 2005
  2. ssk
    Replies:
    5
    Views:
    5,505
    Jukka K. Korpela
    Oct 30, 2006
  3. David Basford
    Replies:
    3
    Views:
    2,421
    BootNic
    Sep 30, 2007
  4. Replies:
    0
    Views:
    936
  5. Carl Howarth

    DG Column Width vs Table Column Width

    Carl Howarth, Oct 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    264
    Eliyahu Goldin
    Oct 24, 2004
Loading...

Share This Page