The text splits into two lines unexpectly

3 posts, 1 answers
  1. Rui
    Rui avatar
    14 posts
    Member since:
    Sep 2015

    Posted 04 Jan 2017 Link to this post

    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. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 04 Jan 2017 Link to this post

    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.
  3. Rui
    Rui avatar
    14 posts
    Member since:
    Sep 2015

    Posted 06 Jan 2017 in reply to Konstantin Dikov Link to this post

    Thanks Dikov,

         It works.

    Best regards

    Zhang Rui

Back to Top