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

Spell checker not updating controls with correct spelling

1 Answer 63 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 04 Dec 2009, 02:52 AM
Hi

I'm having a bit of trouble getting the spell checker to update my checked controls with their proper spelling. I've noticed that the correct values don't display until I click on the controls themselves, and have read that I need to use updateDisplayValue() to make the control display the corrected spelling, but when I call this function, it seems to do nothing. I have also hooked up a handler to the CheckFinished event, and am automatically submitting the page (ie. doing a postback), and the incorrect spelling is still there. How would I go about fixing this?

<telerik:RadSpell ID="rsSpell" runat="server" Skin="Office2007" ButtonType="None" /> 
spellCheck();  
$find("<%= rsSpell.ClientID %>").add_clientCheckFinished(SendSMSAfterSpell); 
//here we create a simple text source for the RadEditor control - used to get/set the text  
        //to spellcheck  
        function EditorTextSource(editor) {  
            this._editor = editor;  
        }  
        EditorTextSource.prototype =  
            {  
                get_text: function() {  
                    var text = this._editor.get_html(true);  
                    return text;  
                },  
 
                set_text: function(text) {  
                    this._editor.set_html(text);  
                }  
            }  
        //this function creates a composite text source for the RadSpell control (using a RadEditor  
        //and a TextBox). The content of all controls is checked at the same time.  
        function spellCheck() {  
            var elements = [new Telerik.Web.UI.Spell.HtmlElementTextSource($get("<%= txtSCSDetails.ClientID %>")),  
                            new Telerik.Web.UI.Spell.HtmlElementTextSource($get("<%= txtMessage.ClientID %>"))];  
            var spellSource = new Telerik.Web.UI.Spell.MultipleHtmlElementsSource(elements);  
            var spell = $find("<%= rsSpell.ClientID %>");  
            spell.spellCheck(spellSource);  
        }  
 
        function SendSMSAfterSpell(sender, args) {  
            args.suppressCompleteMessage = true;  
 
            var text;  
            text = $find("<%= txtMessage.ClientID %>");  
            text.updateDisplayValue();  
 
            text = $find("<%= txtSCSDetails.ClientID %>");  
            text.updateDisplayValue();  
 
            SendMessage(); // this does the postback, which still sees the controls as having incorrect spelling  
        } 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 04 Dec 2009, 09:42 AM
Hello Peter,

I am afraid that the provided information is not enough for us to reproduce the problem locally. Please open a support ticket and send us a sample project where this issue could be observed. We will check it and once we have a better view over your exact setup and logic, we will do our best to provide you with a solution.

All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Spell
Asked by
Peter
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or