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

Insert link craches if at end of document

1 Answer 62 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Håkan asked on 13 Jan 2012, 11:13 AM

I have a RadRichTextBox connected to a RadRichTextBoxRibbonUI.

If I open up a blank document, or an existing document and position the caret at the end of the document and then click on insert link.
I add valid information and click OK in the dialog, I get a null reference exception:
Object reference not set to an instance of an object.

at Telerik.Windows.Documents.Model.RadDocument.IsInRange(HierarchicalIndex inlineIndex, AnnotationRangeStart rangeStart)
at Telerik.Windows.Documents.Model.RadDocument.GetFieldStart(Inline inline)
at Telerik.Windows.Documents.Model.Inline.get_FieldStart()
at Telerik.Windows.Documents.Model.RadDocument.IsValidPosition(DocumentPosition p)
at Telerik.Windows.Documents.Model.RadDocument.EnsureValidPositionCallback(DocumentPosition p, Func`1 IsMoveForward)
at Telerik.Windows.Documents.DocumentPosition.ResumePositionValidation()
at Telerik.Windows.Documents.Model.RadDocument.ExecuteCommand(CommandBase command, DocumentCommandContext context)
at Telerik.Windows.Controls.RadRichTextBox.InsertHyperlink(HyperlinkInfo hyperlinkInfo, String hyperlinkText, StyleDefinition hyperlinkStyle)
at Telerik.Windows.Controls.RadRichTextBox.InsertHyperlink(HyperlinkInfo hyperlinkInfo, String hyperlinkText)
at Telerik.Windows.Controls.RadRichTextBox.<ShowInsertHyperlinkDialog>b__24(String linkText, HyperlinkInfo linkInfo)
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.OnOkClicked()
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.buttonOK_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

But if I position the caret somewhere else, not at the end of the document it works fine.


1 Answer, 1 is accepted

Sort by
Iva Toteva
Telerik team
answered on 13 Jan 2012, 01:20 PM
Hi Håkan,

Both issues - with inserting/editing hyperlinks and inserting a symbol have been fixed in 2011 Q3 SP1 (2011.3.1220), which was released on December 20th 2011.
Could you try using 2011 Q3 SP1? If you experience any issues, we would appreciate more details on the steps to reproduce the problem.

Kind regards,
Iva Toteva
the Telerik team

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

Asked by
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question