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

Content not being updated after ajax request

3 Answers 58 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Aaron Mell
Top achievements
Rank 1
Aaron Mell asked on 30 Aug 2010, 10:33 PM
I have a custom button I am adding to my editor. This button makes an ajax request to update the content of the editor. However, the content does not update properly. This occurs in both firefox and IE, so I do not believe that it is related.


Here is my code.

Telerik.Web.UI.Editor.CommandList[""CustomButton""] = function(commandName, editor, args) {
                    $find(""" + manager.ClientID + @""").ajaxRequest(""foobar"");
                    };


Here is the ajax request event
 private void manager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
if (e.Argument == "Append")
            {
                this.Content += "Does Append work?";
            }
}

the event is firing and the content is being updated, however it never renders to the page.

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 31 Aug 2010, 08:01 AM
Hello,

Have you set the AjaxManager ->  AjaxSettings properly?
AJAX Manager

Set the AjaxSettings as AjaxManager upsdates the updated control.

aspx:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadEditor1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>



Thanks,
Princy.
0
Aaron Mell
Top achievements
Rank 1
answered on 31 Aug 2010, 03:28 PM
That was the problem. Thanks
0
Aaron Mell
Top achievements
Rank 1
answered on 21 Sep 2010, 07:57 PM
Got another problem with this. The Content is only updated when AjaxManager is on the Control with the Editor. However, My editor is in a usercontrol. If I place the Axajmanager on the control, Other ajax request do not work properly. However, if I move the manager to the page, the content no longer updates properly, however, the other ajax requets work properly.


Why doesnt the content get updated properly when the AjaxManager is placed on the page? I am referencing the controlID of the editor properly, yet it is not updated.
Tags
Editor
Asked by
Aaron Mell
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Aaron Mell
Top achievements
Rank 1
Share this question
or