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

GetRootDocument from CustomAnnotationRange

2 Answers 37 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 28 Feb 2015, 11:22 AM
Hello,

I use InsertAnnotationRange for add CustomAnnotationRange to my document and after want to get CustomAnnotationRange associated document from on of its methods. How can I do it? 
I have some trouble with GetRootDocument method. It sometimes returns null. I tryed call editor.UpdateEditorLayout() but nothing has changed.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 04 Mar 2015, 09:11 AM
Hi Alexander,

I've tried to reproduce the issue, but to no avail - the correct document is returned. The GetRootDocument() method can return null if the Annotation's AnnotationMarkerLayoutBox is null or the RadDocument is not measured and arranged.
Please try to call RadDocument's MeasureAndArrangeInDefaultSize() method instead of UpdateEditorLayout(). If the problem still exists, please try to isolate it in a sample project and send it to us.

Looking forward to your reply.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alexander
Top achievements
Rank 1
answered on 24 Mar 2015, 02:27 PM
Todor, thank you for your answer.
Tags
RichTextBox
Asked by
Alexander
Top achievements
Rank 1
Answers by
Todor
Telerik team
Alexander
Top achievements
Rank 1
Share this question
or