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

RadSpellCheck - Dictionary Location?

3 Answers 205 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arthur Colman
Top achievements
Rank 1
Arthur Colman asked on 03 Sep 2011, 04:29 AM
How is a dictionary loaded into the RadSpellChecker (UI product)?

I'm working with the beta of the RichTextBox and I have been able to integrate it along with the RadRibbonUI control that you have provided (by the way quite nice, thanks). It was able to figure out that the SpellChecker associated with the RichTextBox is separate from the SpellChecker used to correct the spelling errors. I have been able to load a .tdf file from the web product into the RichTextBox.SpellChecker and only misspelled words are flagged in the RichTextBox and in the SpellChecker UI.

I can even add words to the dictionary and the additions are retained across uses of the program, so I know that my additions are being stored somewhere. But where?

Just to be clear. I do know how to load a dictionary into the DocumentSpellChecker that is associated with the RichTextBox but I do not know how to load a dictionary into the RadSpellChecker nor do I know where updates made via RadSpellChecker are stored.

Thanks for your help.


3 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 07 Sep 2011, 06:02 PM
Hi Arthur Colman,

New words are added to custom separated dictionary stored in the application isolated storage file system. You can access it by using the following code snippet:

using (IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("CustomDictionary.txt", FileMode.Open, IsolatedStorageScope.Application))
{
   using (StreamReader reader = new StreamReader(fileStream))
   {
      string word;
      while ((word = reader.ReadLine()) != null)
      {
          if (word != string.Empty)
          {
 
          }
      }
   }
}

Best wishes,
Svett
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
kapil
Top achievements
Rank 1
answered on 22 Feb 2013, 06:23 AM

how to add words in to dictionary programmatically?


0
Svett
Telerik team
answered on 26 Feb 2013, 02:04 PM
Hello Kapil,

You should use the code snippet below:
RadSpellChecker spellCheker = new RadSpellChecker();
Type yourTextControlType = typeof(RadTextBox);
IControlSpellChecker controlSpellChecker = spellCheker.GetControlSpellChecker(yourTextControlType);
controlSpellChecker.SpellChecker.AddWord("yourWord");

Note that you should initialize yourTextControlType variable with the text control type that you want to spell check.

All the best,
Svett
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
General Discussions
Asked by
Arthur Colman
Top achievements
Rank 1
Answers by
Svett
Telerik team
kapil
Top achievements
Rank 1
Share this question
or