New line inside textbox for dynamic fields

4 posts, 0 answers
  1. Janitha
    Janitha avatar
    5 posts
    Member since:
    Mar 2016

    Posted 18 Apr Link to this post

    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. 
  2. Katia
    Admin
    Katia avatar
    299 posts

    Posted 20 Apr Link to this post

    Hello Janitha,

    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
  3. DevCraft banner
  4. Janitha
    Janitha avatar
    5 posts
    Member since:
    Mar 2016

    Posted 25 Apr in reply to Katia Link to this post

    What do you mean by ' already formatted text' ? Can you give an example.
  5. Katia
    Admin
    Katia avatar
    299 posts

    Posted 27 Apr Link to this post

    Hi Janitha,

    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
Back to Top