Somehow, pasting content from MS Excel seems to mess up something. For testing purposes, I set up a Window, using the Wizard for the RadRichTextBox, selecting "Word Processor", leaving all other choices at their defaults. Additionally, I added an event handler for the "CommandError" event of the RadRichTextBox.
If I try to paste from Excel, the CommandError event is triggered (except, when only one cell is copied) and the Exception in it has this StackTrace:
The pasted content is not visible. But after for example resizing the window, or scrolling the document, it gets visible. But from now on the editor is more or less unusable:
Is this a bug or am I missing some special requirements to paste from Excel?
If I try to paste from Excel, the CommandError event is triggered (except, when only one cell is copied) and the Exception in it has this StackTrace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Windows.Documents.Model.RadDocument.SplitCurrentParagraph(DocumentPosition position, Paragraph paragraphToCopyPropertiesFrom) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 5251
at Telerik.Windows.Documents.Model.RadDocument.InsertFragmentInternal(DocumentPosition position, DocumentFragment fragment) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 5318
at Telerik.Windows.Documents.Model.RadDocument.InsertFragment(DocumentFragment fragment, DocumentPosition position) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 1463
at Telerik.Windows.Documents.Model.RadDocument.InsertFragment(DocumentFragment fragment) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 1425
at Telerik.Windows.Documents.Commands.InsertFragmentCommand.ExecuteInsertCore(InsertFragmentCommandContext context) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Commands\InsertFragmentCommand.cs:line 10
at Telerik.Windows.Documents.Commands.InsertCommandBase`1.ExecuteOverride(T context) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Commands\InsertCommandBase.cs:line 22
at Telerik.Windows.Documents.Commands.DocumentCommandBase`1.Execute(DocumentCommandContextBase context) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Commands\DocumentCommandBase.cs:line 50
The pasted content is not visible. But after for example resizing the window, or scrolling the document, it gets visible. But from now on the editor is more or less unusable:
- The visible caret stays at the last position, no matter where I click in the document (but the "real position" moves)
- All changes, made in the editor, like typing text, inserting images, get only visible, after the again the window is resized or the document is scrolled.
- Those changes are made, where the "real position" of the caret is, but the caret is shown still either at the original position before the paste or not at all.
Is this a bug or am I missing some special requirements to paste from Excel?