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

how to open editor ui in a window ?

1 Answer 51 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
mahdi gh
Top achievements
Rank 1
mahdi gh asked on 25 Sep 2011, 04:18 PM
Hi
I have a page that contains two input. "Title" and "Text" are my dataTable fields,i used a textbox for "Title" and i want To use a RadRichTextEditor for "Text"

i want to use a button to open the RadRichTextBox in a window, and user will type in it and it will click another button to submit , and then window will close and the text must be shown in the first page.
how should i do that?

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 28 Sep 2011, 07:02 PM
Hi Mahdi Gh,

In order to have RadRichTextBox in a Grid, you can create a DataTemplate for the cell which contains RadRichTextBox that has its IsReadOnly property set to true. 
You can have the content of this RichTextBox bound to some property in XAML, RTF or HTML format via the existing DataProviders. XamlDataProvider will be most convenient in your case, as XAML is closest to our internal model and the export and import are almost lossless.
Then, when you need to edit the content of the document, you can open a RadWindow or ChildWindow, which contains another RadRichTextBox and its content is also bound to the same property, two-way this time. You can also manipulate the UpdateSourceTriggers of the DataProviders for finer control of the updating.
Since the changes will happen on button-click, you can also skip the data binding part and copy the content of the RadDocument like this:

RadDocument documentCopy = firstEditor.Document.CreateDeepCopy() as RadDocument;
secondEditor.Document = documentCopy;

Kind regards,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
mahdi gh
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or