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

Spell Checker with Database

4 Answers 140 Views
SpellChecker
This is a migrated thread and some comments may be shown as answers.
StevenDale
Top achievements
Rank 2
StevenDale asked on 19 Jun 2012, 06:58 PM
2012 Q2

Is it possible to store the words for the dictionary in a database? If not, can do you have an example of how to store it in a file. I have a smart client application that will be run on multiple machines and I will need to place the file on a network share that they can all access. I want to use a global dictionary file that is shared by all users. Using a database would be the best option.

Also, have you added the check as you type red underline feature yet for mispelled words?

Thanks,

Billy Jacobs

4 Answers, 1 is accepted

Sort by
0
Andrew
Telerik team
answered on 21 Jun 2012, 08:08 AM
Hello Billy,

Using a database with RadSpellChecker is possible. I am attaching a sample project illustrating how it can be achieved. The example uses services to access the database as it is in a Silverlight application. In a WPF application you can access it in some other way.
As for your second question we created a PITS issue where you can vote for and track the progress of the item.
You can follow the PITS Issue by its ID: 11560 
Here you can find the PITS Issue: Public URL

Regards,
Andrew
the Telerik team

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

0
Don
Top achievements
Rank 1
answered on 12 Oct 2012, 07:58 AM
Hi Andrew,

We have a similar problem where we would want the Custom Dictionary to be created in the Database instead of the Isolated Storage. I run your attached file RadSpellCheckerUsingDataBase.zip but before clicking on the "Check" button I cleared the Isolated Storage cache by right clicking the mouse then selecting Silverlight > Application Storage > Delete All. Then I proceeded the click on the "check" button. I received the following error. "Initialization Failed - IsolatedStorageException was unhandled by user code" It seems that the Isolated Storage Cache is still being used internally. Is there a way to totally get rid of the the Isolated Storage and just use the database?

Thanks,
0
Andrew
Telerik team
answered on 16 Oct 2012, 03:49 PM
Hi Don,

If you notice in the constructor of the MainPage we get the appropriate ControlSpellChecker and change its dictionary.

Try replacing this logic with the following:

TextBoxSpellChecker tbSpellChecker = (TextBoxSpellChecker)ControlSpellCheckersManager.GetControlSpellChecker(typeof(TextBox));
            DocumentSpellChecker documentSpellChecker = new DocumentSpellChecker();
            documentSpellChecker.AddCustomDictionary(new RadDbCustomDictionary(), new CultureInfo("en-US"));
            tbSpellChecker.SpellChecker = documentSpellChecker;

This should stop it from throwing the mentioned exception.

Greetings,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Don
Top achievements
Rank 1
answered on 19 Oct 2012, 09:34 AM
Thanks Andrew. I think this has solved the problem.
Tags
SpellChecker
Asked by
StevenDale
Top achievements
Rank 2
Answers by
Andrew
Telerik team
Don
Top achievements
Rank 1
Share this question
or