I am not sure I understand your implementation well. Are you using an instance of RadRichTextBox just to create a document fragment?
You should also note that serialization (saving) of the content of the InlineUIContainers is not always possible, especially for complex controls such as RadGridView. In addition, customization of the export process cannot be achieved with the current version (we are planning to expose InlineUIContainerExporting
event similar to the one found in HtmlExportSettings, but this is not scheduled yet).
Here is a sample implementation of GetResultFragment for custom merge field returning document fragment containing RadGridView:
Customer customer =
RadDocument document = CreateDocumentWithRadGridView(customer);
RadDocument CreateDocumentWithRadGridView(Customer customer)
RadGridView gridView =
ItemsSource = customer.Orders
Paragraph paragraph =
Section section =
RadDocument document =
which is modified part of the sample project found here
; but it won't work in your case either, as XamlReader cannot successfully load the RadGridView serialized on document export.
As a general rule, we suggest using InlineUIContainer only in much simpler cases, and in your scenario it's probably better to use the document model.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>