Text wrapping required in RadGrid-GridBoundColumn

3 posts, 0 answers
  1. Chandra Babu Nambi
    Chandra Babu Nambi avatar
    4 posts
    Member since:
    May 2010

    Posted 08 Sep 2010 Link to this post

    Hi Team,

    I have a requirement in my application that, please check the scenario explained below.

    Scenario1: if the no.of records in a grid are less than 10, grid height is fit to that size (no.of records). If the records count is more than 10 is pagination is required. Horizonatal scroll is required in both cases.

    Solutions requierd:

    1. If i used the property AllowScroll="True", Style="overflow: hidden" in ClientSettings, then fixed height is taking for the grid.Horizontal scroll is coming proprly. But our requirement is, height should be fixed to records count (explained in scenario1).
     2. If i am not using the AllowScroll="True", Style="overflow: hidden" in ClientSettings in page, page size is fiiting to no.of records but horizontal scroll bar is not coming. so other columns are missing.
    3. if i used the only property Style="overflow: scroll", then both functionalites are satistifying, but some border is coming to the grid and columns. if you drag the horizontal scroll slowly, some line are coming. please refer the attached screen shot for reference.
    4. I want to display the entire column data that cell (text-wrapping is reqiuired). ex. if there are 300 characters, all should show in wrap mode, but should not increase the column size to 300 or cut of text.

    Please suggest me the solution for this.

    Chandrababu Nambi.
  2. Dimo
    Dimo avatar
    8486 posts

    Posted 10 Sep 2010 Link to this post

    Hello Chandrababu,

    In order to decrease the RadGrid height if the number of data rows is less than 10, please do not set any Height to the control and set ScrollHeight="" (empty string) in the ClientSettings.

    Generally, you should not use an overflow CSS style for the RadGrid - if you want scrolling, then enable the functionality via the corresponding property AllowScroll.

    Normally, browsers do not split long words to parts to make them wrap. You can force such a behavior with the following CSS properties, but only some browsers support it, so it's not a reliable approach:

    .RadGrid  td
        word-wrap: break-word ;
        word-break: break-all ;

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Venkat
    Venkat avatar
    1 posts
    Member since:
    Jun 2015

    Posted 12 Apr 2016 in reply to Dimo Link to this post

    Thank you it's working nice. 
Back to Top