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

TextChanged

1 Answer 23 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Darin Beard
Top achievements
Rank 2
Darin Beard asked on 25 May 2010, 02:08 PM
When RadSpell makes changes to a textbox it does not cause the TextChanged event to fire. I tried calling a __doPostBack OnClientCheckFinished and it posts back but does not handle the TextChanged event on postback. Here's the code I am using at this point (I've tried without the __doPostBack call and with AutoPostback=True and it doesn't postback at all):

ASPX
<asp:TextBox runat="server" ID="ModuleTitleBox" Width="700" TextMode="MultiLine" Rows="1" AutoPostBack="true" /> 
<telerik:RadSpell ID="Radspell1" Runat="server" ControlToCheck="ModuleTitleBox" ButtonType="ImageButton" IsClientID="false" Skin="Black" OnClientCheckFinished="checkFinished"  /> 
 

JS
function checkFinished(sender, args) { 
    args.suppressCompleteMessage = true
    __doPostBack(sender.get_controlToCheck(), ''); 
 

VB
Protected Sub SaveTitleEdit(ByVal sender As ObjectByVal e As System.EventArgs) Handles ModuleTitleBox.TextChanged 
    'saves changes to database here 
End Sub 

1 Answer, 1 is accepted

Sort by
0
Darin Beard
Top achievements
Rank 2
answered on 25 May 2010, 02:26 PM
Looks like I found my own answer. Apprently the OnClientCheckFinished event fires before it actually updates the textbox so posting back at that time is posting back before the text has changed. I changed it to do the postback using OnClientDialogClosed and that handled the TextChanged event on postback. Glad I could help me. :)
Tags
Spell
Asked by
Darin Beard
Top achievements
Rank 2
Answers by
Darin Beard
Top achievements
Rank 2
Share this question
or