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

Show ellipsis when cell content is larger than the specified width

1 Answer 192 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stéphan Parrot
Top achievements
Rank 1
Stéphan Parrot asked on 28 Apr 2011, 09:43 PM
Hi,
Is there a way to have the Grid Resize functionality AND to display cell data on one line and show an ellipsis if it overflows&
I've tried to use CSS ellipsis trick that is suggested all over the web but, the grid won't allow me to resize as soon as the styling of a cell changes... Besides, after looking at the telerik.grid.css file, there's already css coding to show an ellipsis but I want a way to force the cell to not wrap the content on another line which makes the grid's height grow on the page.

Regards,

Stéphan Parrot

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 29 Apr 2011, 12:50 PM
Hi Stéphan,

In order to prevent text wrapping in the Grid, you can use CSS:

.t-grid  td
{
    white-space:nowrap;
}

The above will not work in IE7 due to the browser's limited support of the white-space:nowrap style for table cells. If you must support this browser, you will have to use column templates and wrap the cell cotent in a <nobr> element.

http://demos.telerik.com/aspnet-mvc/grid/templatesserverside

http://demos.telerik.com/aspnet-mvc/grid/templatesclientside

Regards,
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
Tags
Grid
Asked by
Stéphan Parrot
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or