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

Single line of text per grid row

2 Answers 381 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sarvesh
Top achievements
Rank 1
Sarvesh asked on 06 Oct 2012, 10:03 AM
Hi,

My requirement is to show a single line of text per row in the grid. The default behavior of the grid is to show long text on multiple lines. Is there a way to show just one line of text?

Regards,
Sarvesh

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 08 Oct 2012, 08:25 AM
Hi Sarvesh,

The desired behavior can be achieved in the same way as with an ordinary <table> element, by using a white-space:nowrap; style.

However, you have to decide what to do with the text that does not fit and goes beyond the table cells' right border - it will either overflow (by default), or be clipped (if you apply an overflow:hidden style to the cells).

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sarvesh
Top achievements
Rank 1
answered on 12 Oct 2012, 12:17 PM
Thanks Dimo,  white-space:nowrap solved the issue.
Tags
Grid
Asked by
Sarvesh
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Sarvesh
Top achievements
Rank 1
Share this question
or