fixing the grid width

4 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 17 May 2009 Link to this post

    I have a grid inside a containing div, the div is a fixed width of 650px.  Ive set the width of the grid to 100% so it should stay within the boundaries of the containing div.   The grid contains many columns, some of which have fairly long header text
    'Artist Genre Search Narrative'

    because of this, the grid exceeds the width ive set the containing div and 'hangs outside' and off the screen, making it necesssary to scroll the page, a behaviour that I dont want.

    How can I force the header text to wrap, the cell contents do it automatically, but the header doesnt.
    Ive even fixed the width but it makes no difference









    HeaderText="Artist Genre Search Narrative"









    UniqueName="GenreSearchNarrative" Visible="true">



    <HeaderStyle Width="112px" />  ------ this makes no diffrence no matter what value i set it to





  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 May 2009 Link to this post

    Hi MWW,

    Try setting the Wrap property for the Header and see whether it helps. Also set the TableLayout property of the Grid to Fixed.

      <HeaderStyle  Wrap="true" /> 

  3. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 18 May 2009 Link to this post

    Ive tried your suggestion and it makes no difference, the grid still pushes out beyound the width of its containing div
    Ive modified the databound column settings as below and set the header wrap property for the entire grid, nothing makes a difference

                                            HeaderText="Artist Type Search Narrative" 
                                            UniqueName="TypeSearchNarrative"  Visible="true">  
                                            <HeaderStyle  Wrap="true" width="55px"/>   
  4. Dimo
    Dimo avatar
    8407 posts

    Posted 20 May 2009 Link to this post

    Hi Mark,

    Are you using RadGrid scrolling? Is there a table inside that <div>, which contains RadGrid?

    RadGrid wraps its content by default, so there must be something, which prevents it from doing so. Please provide a more comprehensive example, so that we can test locally. Thank you.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top