GridView column text wrap width

Discussion in 'ASP .Net' started by AD, Apr 18, 2007.

  1. AD

    AD Guest

    Hi,

    I have a problem where my text in a GridView column is being wrapped
    in the middle of the column and does not fill the full width of the
    column, any idea why this would happen, and how I can control it?

    Thanks
    AD, Apr 18, 2007
    #1
    1. Advertising

  2. AD

    Mike Guest

    Hi,

    What you need to do is add the no wrap to the column. This can be done two
    was the first is applied to all columns:

    <ItemStyle wrap="False"></ItemStyle>
    <HeaderStyle wrap="False" HorizontaAlign="Centre"></HeaderStyle>

    The second approach is to only apply it to a column:

    <asp:boundColumn DataField..>
    <ItemStyle wrap="False" HorizontaAlign="Left"></ItemStyle>
    <HeaderStyle wrap="False" HorizontaAlign="Centre"></HeaderStyle>
    </asp:boundColumn>

    - Mike

    ---------------------------------------------------------------------------------
    <a href="http://www.cogitar.net"> Cogitar Software. (
    http://www.cogitar.net ) </a>
    http://www.cogitar.net Cogitar Software. (Software Development and Managment
    Systems)
    http://www.web-dominion.co.uk Web-Dominion. (Web Design and hosting )
    http://shop-dominion.com (senery landscape pictur gallery)
    ---------------------------------------------------------------------------------

    "AD" <> wrote in message
    news:...
    > Hi,
    >
    > I have a problem where my text in a GridView column is being wrapped
    > in the middle of the column and does not fill the full width of the
    > column, any idea why this would happen, and how I can control it?
    >
    > Thanks
    >
    Mike, Apr 18, 2007
    #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. Beemer Biker
    Replies:
    0
    Views:
    2,597
    Beemer Biker
    Jan 26, 2009
  2. Replies:
    0
    Views:
    934
  3. Carl Howarth

    DG Column Width vs Table Column Width

    Carl Howarth, Oct 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    263
    Eliyahu Goldin
    Oct 24, 2004
  4. Replies:
    1
    Views:
    1,529
  5. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    228
    Art Werschulz
    Sep 22, 2003
Loading...

Share This Page