Spell Checker : Gets stuck in the word contains special characters

2 posts, 0 answers
  1. Anand
    Anand avatar
    30 posts
    Member since:
    Jul 2014

    Posted 03 Jun 2015 Link to this post

    Hi all, 

    I am facing few issues in command  OpenContextMenuOnNextSpellingErrorCommand. I use this command to find the next word that is spelled wrongly in the document. It works fine as long as the words in the document doesnt contain special characters and keeps finding the next error word in the document. But once if it finds the words contain the special character like (RevPAR), Luto'n or Test$word, it stops finding for the next word in the document and gets stuck.

    Is there any way I can fix this please ? We are using telerik version 2014.3.1021.40.




  2. Svetoslav
    Svetoslav avatar
    55 posts

    Posted 04 Jun 2015 Link to this post

    Hi Anand,

    Thank you for contacting us.

    This is issue is known and already logged in our feedback portal where you can track its state: "Go to next word does not treat punctuation marks as separate words". The problem is with the GoToNextWord() method  which doesn't work as expected in this case.

    As a workaround I would suggest you to use the following code snippet:
    private DocumentPosition caretPostion;
    private void OpenContextMenuOnNextSpellingErrorCommand(object sender, RoutedEventArgs e)
        RadRichTextBox rtb = this.radRichTextBox;
        if (this.caretPostion == null)
            this.caretPostion = rtb.Document.CaretPosition;
        var currentCaretPostion = rtb.Document.CaretPosition;
        if (currentCaretPostion == this.caretPostion)
            this.caretPostion = rtb.Document.CaretPosition;

    I hope this information is helpful. Let me know if you need further assistance.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top