spellchecker empty dictionary

2 posts, 0 answers
  1. Steven
    Steven avatar
    10 posts
    Member since:
    Apr 2011

    Posted 27 Nov 2012 Link to this post


    Ive gone through the following document to set up the spellchecker inside my RadGridView

    All great! However, the dictionary of words is empty.

    I have referenced the Telerik.Windows.Documents.Proofing.Dictionaries.En-US assembly and I have registered the various spell-checkers and added the RadEn_USDictionary to them within the initialisation of the prism IModule implementation for the specific silverlight project as follows:

    ControlSpellCheckersManager.RegisterControlSpellChecker(new TextBoxSpellChecker());
    ControlSpellCheckersManager.RegisterControlSpellChecker(new RichTextBoxSpellChecker());
    ControlSpellCheckersManager.RegisterControlSpellChecker(new RadRichTextBoxSpellChecker());
    var textBoxControlSpellchecker = ControlSpellCheckersManager.GetControlSpellChecker(typeof(TextBox));
    var textBoxDocumentSpellChecker = (DocumentSpellChecker) textBoxControlSpellchecker.SpellChecker;
    textBoxDocumentSpellChecker.AddDictionary(new RadEn_USDictionary(), new CultureInfo("en-US"));

    Any ideas? Given everything seems to be working except for the fact the dictionary is empty; I'm thinking it has something to do with the addition of RadEn_USDictionary to the spell-checkers (note: I'm adding the dictionary to each of teh spell-checker types).

    Also, another side question; if I don't call RegisterControlSpellChecker on all 3 spell-checkers (TextBox, RichTextBox, RadRichTextBox) I'm getting a NullReference exception...

    Kind regards
  2. Andrew
    Andrew avatar
    140 posts

    Posted 29 Nov 2012 Link to this post

    Hi Steven,

    When you spellcheck a GridView or RadGridView only RadRichTextBoxSpellcker is used. So initializing the other two is redundant. If you use the "Reduce XAP size by using assembly library caching", MEF won't be able to load the dictionaries and that's why you need to do it manually (as you are doing right now). 

    Unfortunately we cannot make any other conclusions out of the code you sent us so we will ask you to open a support ticket and attach a project illustrating the issue.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top