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

Binding contents to DataSource

1 Answer 108 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Ashley
Top achievements
Rank 1
Ashley asked on 11 Dec 2012, 03:44 PM
Hi,

I am trying to get a RadRichTextBox to be automatically populated with the contents of a field from an Oracle database. I have set up the properties in the same way that I would for a regular Windows Forms Rich Text Box - by setting the DataBindings Text property to be the BindingSource followed by the field name.

This is working for a regular RichTextBox, however the RadRichTextBox remains empty.

I have attached a screenshot of the Properties window so you can see exactly what I've set.

Any ideas would be appreciated.

Thanks,
Ashley

1 Answer, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 14 Dec 2012, 09:43 AM
Hello Ashley,

You should use the TextFormatProvider to import plain text in RadRichTextBox:

TxtFormatProvider provider = new TxtFormatProvider();
this.radRichTextBox1.Document = provider.Import("Your Text");

You can read more about format providers in the online documentation. Greetings,
Svett
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Ashley
Top achievements
Rank 1
Answers by
Svett
Telerik team
Share this question
or