Word-wrap in Resources Column

2 posts, 0 answers
  1. Ovidio
    Ovidio avatar
    3 posts
    Member since:
    Aug 2011

    Posted 18 Apr 2012 Link to this post

    Is it possible for the text for resources to word-wrap.  Please see attached.
  2. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 23 Apr 2012 Link to this post

    Hello Ovidio,

     
    One way to achieve such functionality is to find the div elements with jQuery and replace the empty spaces with "<br>" tags as in the code below:

    function pageLoad() {
               $telerik.$(".rsVerticalHeaderTable tr th div").each(function(index, elem) {
                elem.innerHTML=elem.innerHTML.replace(" ","<br>");
                 elem.innerHTML=elem.innerHTML.replace(" ","<br>");
                  elem.innerHTML=elem.innerHTML.replace(" ","<br>");
     
               });
           }

    The replace method in javascript is catching only the first element so you can perform the line as many times as many spaces you have in the longest resource name.

    Hope this will be helpful.

    Greetings,
    Plamen Zdravkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top