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

update radeditor on a buttonclick with radajaxmanager

1 Answer 70 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
xyz
Top achievements
Rank 1
xyz asked on 10 Mar 2009, 01:25 PM
       function SetEditorContent(content, isInternal) {  
            $find("<%=editorNotes.ClientID%>").set_html(content); //set content to RadEditor on the mane page from RadWindow  
            document.getElementById('<%= chkIsInternal.ClientID%>').checked = isInternal;  
            if (content != null)  
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Refresh");  
        }  
        function OnClientResize(sender, eventArgs) {  
        }  
    </script> 
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
        onajaxrequest="RadAjaxManager1_AjaxRequest">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnAddNotes">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadPageView6" /> 
                    <telerik:AjaxUpdatedControl ControlID="editorDesc" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
In the same page  
 
                <telerik:RadPageView ID="RadPageView6" runat="server">  
                    <div id="requestNotes">  
                    <div class="buttonsDisplay">  
                        <div class="rbtnDisplay">  
                            <asp:RadioButtonList ID="radlstNotes" runat="server" RepeatColumns="3" width="400px" 
                                RepeatDirection="Horizontal" height="50px" AutoPostBack="True"   
                                onselectedindexchanged="radlstNotes_SelectedIndexChanged">  
                                <asp:ListItem Text="Notes Only" Value="0" Selected="True"></asp:ListItem> 
                                <asp:ListItem Text="Transaction Log Only" Value="1"></asp:ListItem> 
                                <asp:ListItem Text="All" Value="2"></asp:ListItem> 
                            </asp:RadioButtonList> 
                        </div> 
                        <div class="addnotes">  
                        <br /> 
                            <asp:Button ID="btnAddNotes" OnClientClick="ShowNotesDialog(); return false;"   
                                runat="server" Text="Add Notes" Width="100px" onclick="btnAddNotes_Click" /> 
                        </div> 
                    </div> 
                        <span class="spaceUnderLabel"></span> 
                            <telerik:RadEditor ID="editorDesc" runat="server" 
                                Height="350px" Skin="Outlook" Width="900px" Enabled="False">  
                                <Content> 
                                </Content> 
                                <Tools> 
                                </Tools> 
                            </telerik:RadEditor> 
                    </div> 
                </telerik:RadPageView> 

 codebehind:
protected

 

 

 

 

void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

{

 

if (e.Argument == "Refresh")

 

{
save a record in database //working fine
//want to refresh the editor1 here
}
}

 

Hi,
I am trying to refresh a radeditor1 which is disabled on a button1 click using radajaxmanager1 (page1.aspx)

when button1 is clicked it opens a radwindow with a radeditor2 and  2 buttons. so when a button on radwindow is clicked, it comes back to page1.aspx and goes to RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) and saves a record. After saving a record i want my radeditor1 to get refreshed. please help me. i am pasting the code here.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 12 Mar 2009, 01:57 PM
Hi xyz,

Please find attached a sample project iluustrating the desired scenario and try it on your end. Let me know if it works as expeted and if I missed something important.

All the best,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
xyz
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or