Bug when pasting from Excel?

2 posts, 0 answers
  1. Helmut
    Helmut avatar
    3 posts
    Member since:
    Jan 2013

    Posted 20 Mar 2013 Link to this post

    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:

    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.
    The same happens with the demo application!
    Is this a bug or am I missing some special requirements to paste from Excel?
  2. Boby
    Boby avatar
    586 posts

    Posted 25 Mar 2013 Link to this post

    Hi Helmut,
    Unfortunately this is a bug in RadRichTextBox, most probably related to the RTF format provider (which is internally used when importing content from Excel). We will log the issue and will try to fix it in a future release.

    Please, excuse us for the inconvenience. We have added points to your account for the report. Don't hesitate to contact us if you have other questions.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top