Grid contents not wrapping

3 posts, 0 answers
  1. Anand S
    Anand S avatar
    10 posts
    Member since:
    Jul 2009

    Posted 22 Sep 2009 Link to this post

    Hi,

    We are using telerik grid where we display data entered by our users. We  have set fixed column widths and enabled  wrap.

    What  happens is if there is a word w/o space it does not wrap,  rather it gets cut while being displayed.

    What  is the solution  for this - e.g. any grid tools wraps data automatically 


    Thanks 

    Anand
  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 22 Sep 2009 Link to this post

    Hello Anand-

    Sorry to hear about your trouble with the long word wrapping. I know that is frustrating!

    Unfortunately, this is a "native" behavior of HTML. Long words that do not have any spaces or "break characters" cannot be wrapped. The solutions are either:

    A) Before binding your data, "clean" it with code that inserts spaces at specific intervals so it can be property wrapped
    B) Let the text "overflow" in to a hidden area (the approach RadGrid provides automatically)

    For more discussion on this HTML issue, check out this discussion on Stackoverflow:

    Hope that helps!
    -Todd
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fabio
    Fabio avatar
    5 posts
    Member since:
    Oct 2012

    Posted 02 Apr 2014 Link to this post

    I got around this problem by using CSS style "word-break:break-all;"

    @(Html.Telerik().Grid<
    ...
    columns.Bound(c => c.Name).HtmlAttributes(new { @style = "word-break:break-all;" });
    ...
Back to Top