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

Expandable list with textbox in it

1 Answer 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 19 Nov 2012, 09:25 AM
I have a list which contains one textbox in it.

Basically what it does is get some results and display them one above the other.
The problem occures when I have a result that is multiline. The result then tends to "overflow" over everything under it.

The structure of the portion is

Group 1
    Question 1
         Result 1
         Result 2
         ...
         Result N

Group 2
     Question 1
          Result 1
          Result 2
          ...
          Result N

If for example Result 1 is multiline it will overflow onver Result 2/3/4 or even over the next group...
How can I make the list which contains Results expand as the textbox for the results expand as well (TextBox.CanGrow = true for textboxes holding results. I can't find anything similar for lists)

Edit: I have solved the problem by using "Regex.Replace(string,"\r", " ") and having it all in one line and wrapping but I would really like to keep the formating if possible

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Nov 2012, 01:04 PM
Hi Ivan,

Our suggestion is you to use \r\n instead of \r. If you can't replace the carriage return characters in your data source our suggestion is to utilize an user function for replacing the carriage return characters as the following one:

public static object ReplaceCRCharacters(string value)
{
    return value.Replace("\r", "\r\n");
}
Kind regards,
Peter
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Ivan
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or