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

The text splits into two lines unexpectly

2 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rui
Top achievements
Rank 1
Rui asked on 04 Jan 2017, 09:47 AM

Hi,

     When I looked into this demo,

      http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/manual-crud-operations/defaultcs.aspx

    I found if I input a long enough product name  such as 

')aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'

     The text will be split into two lines in the text box.

     The first line only has a single character ( , and other characters are placed in the second line.

     Please see the attached screen shot.

     What I expect is that the produce name should be in a single line.

     This error only reproduce in IE but not in Chrome.

      Thanks.

Best regards

Zhang Rui

2 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 04 Jan 2017, 01:13 PM
Hello Rui,

This is the default behavior of TABLE elements, but you can customize the appearance and force the content to be displayed on a single line with the following CSS:
<style>
    .RadGrid .rgRow td,
    .RadGrid .rgAltRow td {     
        white-space: nowrap;
    }
</style>

You can also try the following, which will add "..." at the end of the content if it does not fit in the width of the column:
<style>
    .RadGrid .rgRow td,
    .RadGrid .rgAltRow td {
        overflow: hidden;
        text-overflow:ellipsis;
        white-space: nowrap;
    }
</style>


Best Regards,
Konstantin Dikov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Rui
Top achievements
Rank 1
answered on 06 Jan 2017, 06:00 AM

Thanks Dikov,

     It works.

Best regards

Zhang Rui

Tags
Grid
Asked by
Rui
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Rui
Top achievements
Rank 1
Share this question
or