We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

All text selection

Thread ID:





127686 Dec 2,2016 08:08 AM Dec 5,2016 11:29 PM UWP 3
Tags: SfRichTextBoxAdv
Asked On December 2, 2016 08:08 AM

Hi! Could you tell the right way to make the whole document to be selected as using Ctrl+A shortcut from code-behind?
I tried to do like that:

this.richTextBox.Selection.Select(this.richTextBox.Document.DocumentStart, this.richTextBox.Document.DocumentEnd);

but it is very slow, and i have a problem. The steps are:
- insert hyperlink
- put cursor somewhere after hyperlink
- execute code from above => text selection applied only from that link, not from document begining

Thank you!

Venkatesan Mani [Syncfusion]
Replied On December 5, 2016 04:55 AM

Hi Alexander,

Thank you for using Syncfusion products.

We were able to reproduce the issue “selection using API in SfRichTextBoxAdv control” with the provided steps. A support incident to track the status of this issue has been created under your account. Please log on to our support website to check for further updates


As an alternative solution, you can use the AddSelection() of SelectionRanges property. Please find the sample code from following table. Try this at your end and let us know if this helps you. 
//Clear the existing selections.  this.richTextBox.Selection.SelectionRanges.Clear();  //Adds the document start and end position as new selection range.  this.richTextBox.Selection.SelectionRanges.Add(this.richTextBox.Document.DocumentStart, this.richTextBox.Document.DocumentEnd); 
Best regards,
Venkatesan M 

Replied On December 5, 2016 07:00 AM

Thank you, this solution works!

Venkatesan Mani [Syncfusion]
Replied On December 5, 2016 11:29 PM

Hi Alexander,

Please let us know if you have any other questions. We will be happy to assist you.

Thank you for using Syncfusion Products.

Venkatesan M. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.