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

[Solved] Whietspace preserve in radgrid columns

3 Answers 278 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Balamurali Venkatesan
Top achievements
Rank 1
Balamurali Venkatesan asked on 27 Jul 2009, 12:00 PM
Hi,
Iam actually binding a radgrid using object datasource.

One of the column(Long Description) has whitespaces in between texts
For example qwe have text like (Sample    Text)..You can see like the text has 3 or 4 white spaces.

While displaying on the ardgrid the browser automatically trimms the spaces and displays (Sample Text).The column text should display as it is..

Is there any property to prevnet the trimming of spaces in the column.


Thanks and Regards
V.Balamurali

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Jul 2009, 05:20 AM
Hi,

I guess the cell text is getting wrapped to the next line.

Eg: Sample Text ---> what you expect

    Sample      ---> what you get(wrapped)
    Text

If you want to prevent wrapping of the Grid cell contents you may try the suggestion in the following help article.
No wrap for grid cell content

Thanks
Shinu
0
Martin
Telerik team
answered on 28 Jul 2009, 03:13 PM
Hello,

I think the problem is due to the HTML rule that renders consequent intervals as a single interval.
I demonstrate this in the attached sample project.
Please note that when the Grid is put into Edit mode you get the original text with all the intervals in it.

I hope this helps.

Sincerely yours,
Martin
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.
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 29 Jul 2009, 06:55 AM
Hi,

Thanks for the update ,but I was able to find a solution suing CSS style as mentioned below

.preserveSpace

 

{white-space:pre;}

 


In the Item style property of the grid iam using the above mentioned css style

<

 

ItemStyle CssClass="preserveSpace"  />

 


Thanks
Bala

Tags
Grid
Asked by
Balamurali Venkatesan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Martin
Telerik team
Balamurali Venkatesan
Top achievements
Rank 1
Share this question
or