Completed
Last Updated: 28 Jan 2013 07:59 by ADMIN
ADMIN
Stefan
Created on: 28 Jan 2013 07:59
Category:
Type: Bug Report
3
FIX. RadRichTextBox - NullReferenceException when calling the RemoveHyperlink method
To reproduce:
- Create a document and add some text in it "test"
- Select the text and press Ctrl + K to open the hyperlink editor
- Add the following address: http://www.telerik.com
- Place the caret in the word (test) and press a button that calls the RemoveHyperlink method of the control

WORKAROUND:
 var suspend = typeof(RadDocument).GetMethod("SuspendCurrentSpanStyleUpdate", BindingFlags.Instance | BindingFlags.NonPublic);
            suspend.Invoke(radRichTextBox1.Document, null);

            radRichTextBox1.RemoveHyperlink();

            var resume = typeof(RadDocument).GetMethod("ResumeCurrentSpanStyleUpdate", BindingFlags.Instance | BindingFlags.NonPublic);
            resume.Invoke(radRichTextBox1.Document, null);
0 comments