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

Word-wrap in Resources Column

1 Answer 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ovidio
Top achievements
Rank 1
Ovidio asked on 18 Apr 2012, 03:12 PM
Is it possible for the text for resources to word-wrap.  Please see attached.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 23 Apr 2012, 08:31 AM
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.
Tags
Scheduler
Asked by
Ovidio
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or