Declined
Last Updated: 25 Apr 2016 14:43 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 15 Apr 2016 11:25
Category: RichTextEditor
Type: Bug Report
0
ADD. RadRichTextEditor - ArgumentOutOfRangeException when exporting RadRichTextEditor with RtfFormatProvider
To reproduce:

radRichTextEditor.Document = new RadDocument();
radRichTextEditor.Document.MeasureAndArrangeInDefaultSize();
radRichTextEditor.UpdateEditorLayout();
radRichTextEditor.Document.CaretPosition.MoveToLastPositionInDocument();

var p = new Paragraph();
p.Inlines.Add(new Span("Cell"));
var cell = new TableCell();
cell.Blocks.Add(p);
var row = new TableRow();
row.Cells.Add(cell);
var table = new Table();
table.Rows.Add(row);
var section = new Section();
section.Blocks.Add(table);
radRichTextEditor.Document.Sections.Add(section);
radRichTextEditor.Document.CaretPosition.MoveToLastPositionInDocument();

var provider = new RtfFormatProvider();
var txt = provider.Export(radRichTextEditor.Document);
Clipboard.SetText(txt, TextDataFormat.Rtf);

Workaround: measure the document after the section is added:
radRichTextEditor.Document.Sections.Add(section);
radRichTextEditor.Document.MeasureAndArrangeInDefaultSize();
radRichTextEditor.UpdateEditorLayout();
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Stefan
Posted on: 25 Apr 2016 14:43
Declined as duplicate. See: http://feedback.telerik.com/Project/154/Feedback/Details/188589