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.