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

Conditional Line Breaks

2 Answers 334 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shane
Top achievements
Rank 1
Shane asked on 07 Dec 2009, 11:15 AM
how can i conditionally add line breaks to a expression?. I know about ctrl+enter but this won't work conditionally and seems i can't put in /n. I also know about your html textbox but tried using that so failed to work.

Thanks
Shane

2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 08 Dec 2009, 08:25 AM
Hi Shane,

Using Ctrl+Enter would produce the following output in the InitializeComponent() method:

this.textBox2.Value = "line 1\r\nline 2\r\nline 3";

There is no way to apply this conditionally from the designer, but you can always alter the Value of the textbox in the provided events and add necessary \r\n to your data.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Shane
Top achievements
Rank 1
answered on 08 Dec 2009, 01:34 PM
yeh thought i was going to have to result to that, should be something available in the editor i think.

Thanks anyway,
Shane
Tags
General Discussions
Asked by
Shane
Top achievements
Rank 1
Answers by
Steve
Telerik team
Shane
Top achievements
Rank 1
Share this question
or