datagrid columns width

Discussion in 'ASP .Net Datagrid Control' started by jijis, May 16, 2005.

  1. jijis

    jijis Guest

    i want to ask how to set the width of a specified column even the data
    included isn't long fit with it.
     
    jijis, May 16, 2005
    #1
    1. Advertising

  2. jijis

    Elton W Guest

    Hi Jijis,

    You can use HeaderStyle and ItemStyle to set column width:

    <asp:BoundColumn DataField="DataField"
    HeaderText="HeaderText">
    <HeaderStyle HorizontalAlign="Center"
    Width="220px"></HeaderStyle>
    <ItemStyle Width="220px"></ItemStyle>
    </asp:BoundColumn>


    HTH

    Elton Wang



    >-----Original Message-----
    >i want to ask how to set the width of a specified column

    even the data
    >included isn't long fit with it.
    >
    >
    >.
    >
     
    Elton W, May 17, 2005
    #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:
    786
    Bruce Barker
    Oct 10, 2005
  2. kris
    Replies:
    11
    Views:
    877
  3. ssk
    Replies:
    5
    Views:
    5,521
    Jukka K. Korpela
    Oct 30, 2006
  4. rob thomson
    Replies:
    0
    Views:
    264
    rob thomson
    Sep 4, 2003
  5. ton
    Replies:
    2
    Views:
    207
    Alvin Bruney [MVP]
    Feb 11, 2004
Loading...

Share This Page