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

HELP! Change ForeColor of a specific string in a textbox

1 Answer 192 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dondon
Top achievements
Rank 1
Dondon asked on 24 Nov 2017, 07:05 AM

Hi,

 

How do I change the forecolor of specific string in a textbox in telerik reporting in code behind?

Im pretty sure that I will put the code in the databind event but how do I code there?

For example, the string data is "Change the string property of the textbox" in a textbox. Now I want to change the forecolor to of "property" and the "textbox" to yellow and I want to make it Bold.

How do I do that?

Thanks,

 

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 24 Nov 2017, 02:33 PM
Hello Dondon,

In fact, you can use HtmlTextBox instead of TextBox report item, which allows to insert HTML-formatted text into a report. You can define colors, fonts, etc.
Please find how to edit HtmlTextBox report item in following help article - Editing HtmlTextBox.

There are two supported modes at design time editor of HtmlTextBox. The first one is Interactive, which directly shows the design view of the text. You can select any portion of the text and modify it as you want - make it bolder, italic, change the font size or color. The second mode is Expression, witch displays plain HTML in the source editor. If you feel comfortable typing HTML, you can set the styles into the editor.


Regards,
Silviya
Progress 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
Dondon
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or