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

New line inside textbox for dynamic fields

3 Answers 1154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Janitha
Top achievements
Rank 1
Janitha asked on 18 Apr 2016, 06:55 AM
In my report I have used textboxes with "Fields" property to dynamically bind the data using CSV data sources. But in these text boxes I need to use line breaks/new lines using only one Fielld. For example I should be able to make csv field as "Janitha \n Silva" and in text box automatically new line should be added. I know that this can be done by using htmltextboxes. But I need to know is there any way to do this by using only textboxes, not htmltextboxes. 

3 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 20 Apr 2016, 03:13 PM
Hello ,

New line escape won't be recognized by TextBox item. You can either set already formatted text as a TextBox's value or use built-in text functions or custom functions to format the string.

For example, inserting a new line can be achieved with Format() function:

= Format("First line: {0}
Second line: {1}", Fields.DataField1, Fields.DataField2)


You can use TextBox in-place editing to insert a new line with CTRL-Enter.


Regards,
Katia
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Janitha
Top achievements
Rank 1
answered on 25 Apr 2016, 11:18 AM
What do you mean by ' already formatted text' ? Can you give an example.
0
Katia
Telerik team
answered on 27 Apr 2016, 02:38 PM
Hi ,

For example, when the text that you set as TextBox's value already has line breaks or they were entered using TextBox in-place editing to insert a new line with CTRL-Enter.


Regards,
Katia
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Janitha
Top achievements
Rank 1
Answers by
Katia
Telerik team
Janitha
Top achievements
Rank 1
Share this question
or