This is a migrated thread and some comments may be shown as answers.

Text wrapping required in RadGrid-GridBoundColumn

2 Answers 657 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chandra Babu Nambi
Top achievements
Rank 1
Chandra Babu Nambi asked on 08 Sep 2010, 11:30 AM
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.

Regards,
Chandrababu Nambi.

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 10 Sep 2010, 07:39 AM
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,
Dimo
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
0
Venkat
Top achievements
Rank 1
answered on 12 Apr 2016, 07:39 AM
Thank you it's working nice. 
Tags
Grid
Asked by
Chandra Babu Nambi
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Venkat
Top achievements
Rank 1
Share this question
or