Spell Checker with Database

5 posts, 0 answers
  1. StevenDale
    StevenDale avatar
    100 posts
    Member since:
    Apr 2007

    Posted 19 Jun 2012 Link to this post

    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
  2. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 21 Jun 2012 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Don
    Don avatar
    7 posts
    Member since:
    Jun 2011

    Posted 12 Oct 2012 Link to this post

    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,
  5. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 16 Oct 2012 Link to this post

    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.

  6. Don
    Don avatar
    7 posts
    Member since:
    Jun 2011

    Posted 19 Oct 2012 Link to this post

    Thanks Andrew. I think this has solved the problem.
Back to Top
UI for WPF is Visual Studio 2017 Ready