Completed
Last Updated: 31 Oct 2018 08:14 by ADMIN
ADMIN
Todor
Created on: 16 Sep 2016 08:48
Category: RichTextBox
Type: Bug Report
0
RichTextBox: ArgumentOutOfRangeException is thrown when replacing all occurrences of given text if the replace text is with smaller length than the searched text
ArgumentOutOfRangeException is thrown when replacing all (Replace All button is clicked from the FindReplace dialog) occurrences of given text if the replace text is with smaller length than the searched text. 

For example if we have the following text written in the RadRichTextBox: "Some Text" and we want to replace all occurrences of "Some Tex" with "AA" (open find and replace dialog and click ReplaceAll button), the exception occurs

Workaround: Change the FindReplaceDialog with a custom one (see how in this SDK demo - https://github.com/telerik/xaml-sdk/tree/master/RichTextBox/CustomFindReplaceDialog ). In the new custom dialog, buttonReplaceAll_Click event handler, change the initialization of the 'startFindPosition' variable to be in the body of the while loop.

Available in LIB Version 20181.205.
0 comments