Using RemoveWord on Spellchecker

4 posts, 1 answers
  1. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 09 Apr 2012 Link to this post

    Remove word doesn't really seem to work for me.  I want to remove the word 'repot' because report is misspelled a lot.
    this.myRichTextBox.SpellChecker.RemoveWord("repot");
    This doesn't seem to work.  Maybe it's not possible if I load it like:
    <telerik:RadRichTextBox Name="myRichTextBox" IsSpellCheckingEnabled="True"
  2. Answer
    Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 11 Apr 2012 Link to this post

    Hi Dan,

    The DocumentSpellChecker.Remove(srting str) method removes the word from a Custom Dictionary associated with Invariant Culture. The word "repot" is in the main dictionary - RadEn_UsDictionary which you can't edit with code.
    What you can do is to build your version of RadEn_UsDictionary, which does not include "repot". In order to do that, you should remove the reference to Telerik.Windows.Documents.Proofing.Dictionaries.En-US. Then, modify the en-US.tdf file using a text editor, locate the word and delete it, then save the file. You can download the en-US.tdf from the source of RadControls for Silverlight or from this forum post. Create a custom dictionary that loads the en-US.tdf file as described here.

    Please try that and get back to us if you need further assistance.

    Regards,
    Andrew
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 11 Apr 2012 Link to this post

    Thanks for the response.  It's easier not to load the tdf file because I use the spell checker on a popup window and it takes time to load it every time.  No big deal, I'll probably just keep doing it the existing way, but I know how to do it if I have to.
  5. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 12 Apr 2012 Link to this post

    Hi Dan,

    We are glad you understood the approach we proposed. I just wanted to suggest one more option to you. I suppose you use our current RadEn_UsDictionary by loading the dll that comes with our controls where the dictionary is located. If that's the case, then you can create your own dll (Silverlight Class Library) with the edited .tdf file.
    We created a sample project where the dictionary is the same except that the word "repot" is missing. You can get the dll and use it as the default one that comes with our suite.

    Kind regards,
    Andrew
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top