Hi there.
I got a problem that the OnTextChanged-Event from the radEditor does not work as expected. I got this following Code-Snippet:
This is within a RadAjaxPanel.
Now my event-handler (opened by every radtextbox and the radeditor) looks this way:
Now the following happens:
When I change a Text in RadTextbox and leave it the event is fired and anyText_Changed is run (like expected)
But when I change the text in the RadEditor nothing happens.
When after editing some Text in the RadEditor I change the Text of a radTextbox and then reactivate the radEditor (by clicking into it) the event from the Textbox AND from the radEditor is fired (jumping into the else if - part)
So it looks like the OnTextChanged-Event from radEditor does not initiate a Postback.
Any clue?
I got a problem that the OnTextChanged-Event from the radEditor does not work as expected. I got this following Code-Snippet:
<asp:Label SkinID="mailLabel" ID="lblMailRcp" runat="server" Font-Bold="true" Text="<%$Resources:TextResources, ID_MAIL_TO%>" /> </td><td width="650"><telerik:RadTextBox OnTextChanged="anyText_TextChanged" ID="txtMailTo" Font-Size="10" runat="server" ReadOnly="true" Width="100%" AutoPostBack="true"></telerik:RadTextBox> |
<telerik:RadEditor ID="EditorMailBody" runat="server" EditModes="Design" OnTextChanged="anyText_TextChanged" AutoPostBack="true" |
Enabled="True" EnableResize="True" Language="de-DE" |
ToolsFile="~/App_GlobalResources/NoTools.xml" Visible="True" |
Width="100%" Height="275" SkinID="EmailEditor" |
><Content /></telerik:RadEditor> |
This is within a RadAjaxPanel.
Now my event-handler (opened by every radtextbox and the radeditor) looks this way:
protected void anyText_TextChanged(object sender, EventArgs e) |
{ |
if (sender is RadTextBox) |
{ |
RadTextBox selBox = (RadTextBox)sender; |
switch (selBox.ID) |
{ |
case "txtMailTo": |
_currentEmail.Recipient = selBox.Text; |
break; |
case "txtMailSubject": |
_currentEmail.Subject = selBox.Text; |
break; |
case "lblMailSender": |
_currentEmail.Sender = selBox.Text; |
break; |
} |
} |
else if (sender is RadEditor) |
{ |
RadEditor selBox = (RadEditor)sender; |
switch (selBox.ID) |
{ |
case "EditorMailBody": |
_currentEmail.Body = selBox.Text; |
break; |
} |
} |
_currentEmail.UpdateEmail(); |
Now the following happens:
When I change a Text in RadTextbox and leave it the event is fired and anyText_Changed is run (like expected)
But when I change the text in the RadEditor nothing happens.
When after editing some Text in the RadEditor I change the Text of a radTextbox and then reactivate the radEditor (by clicking into it) the event from the Textbox AND from the radEditor is fired (jumping into the else if - part)
So it looks like the OnTextChanged-Event from radEditor does not initiate a Postback.
Any clue?