HELP! Change ForeColor of a specific string in a textbox

2 posts, 0 answers
  1. Dondon
    Dondon avatar
    7 posts
    Member since:
    Aug 2017

    Posted 24 Nov 2017 Link to this post



    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?



  2. Silviya
    Silviya avatar
    357 posts

    Posted 24 Nov 2017 Link to this post

    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.

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