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

spellchecker empty dictionary

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 27 Nov 2012, 10:48 PM
Hello,

Ive gone through the following document to set up the spellchecker inside my RadGridView
http://www.telerik.com/help/silverlight/radspellchecker-getting-started.html#Spellchecking_Grids

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
Steve

1 Answer, 1 is accepted

Sort by
0
Andrew
Telerik team
answered on 29 Nov 2012, 05:03 PM
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.


Regards,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Steven
Top achievements
Rank 1
Answers by
Andrew
Telerik team
Share this question
or