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

Multiple RadAjaxManager's in my unique application

1 Answer 262 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 26 Jan 2009, 05:55 PM
Dear Teleriks,
I have  an application that has a RadAjaxManager in a page that has a couple telerik controls (I will call this page parent.aspx). Parent dynamically populates a <DIV> via ajax call (jquery). The resulting <DIV>, once populated, contains another RadAjaxManager and a TabStrip (I will call this page 'child.aspx').
The child requires the RadAjaxManager to avoid parser/compiler errors. The controls inside the child work just fine with its RadAjaxManager. But once the child is loaded into the parent, it looks as if the parent's controls are calling the child's RadAjaxManager's javascript because the parent's controls events no longer work when I load the child with the AjaxManager

Here is some of my code of parent.aspx:

// parent.aspx 
 <telerik:RadScriptManager ID="RadScriptManager" runat="server"></telerik:RadScriptManager> 
 
// several telerik controls in the page 
// ... 
// ... 
 
<div id="childWindow" /> 

Which then executes the following javascript:

// Parent.aspx uses jquery 
// What this function does is POST an ajax call to child.aspx and uses the  
// response to populate the "childWindow" DIV  
 
$j.ajax({ 
    type: 'POST', 
    data: '', 
    url: /child.aspx', 
    success: function(msg) { 
        $j("#childWindow").html(msg); 
    } 
}); 

child.aspx contains a scriptmanager for more telerik controls, notably, chart, tabstrip, and grid.
example of child.aspx:

// child.aspx 
 
<telerik:RadScriptManager ID="RadScriptManager_Child" runat="server"></telerik:RadScriptManager> 
 
<telerik:radtabstrip id="radTabs" runat="server" Skin="Summary" .... /> 
 
// ... 

After the child page is loaded. In all my attempts to get these two pages to work together, the parent's controls give either 1.) strange errors, which referenced the inserted javacsript from the ajaxmanager of the child or 2.) events of the parents controls work almost as if they're no longer firing (ex. postback from an onchange event), however, no error is shown.

Any ideas? Are the scriptmanagers safely encapsulated from each other if added at runtime?  Could the parent's teleriks changing mode into ajax calls once the second manager is added?
Any suggestions would help, otherwise I will need to abandon telerik (as this app is javascript heavy).

Thanks. If I come to a solution I will post it; I will gladly return the favor in exchange for some ideas.
-Tim

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 28 Jan 2009, 03:48 PM
Hi Tim,

Note that RadAjax does not allow more than one RadAjaxManager on the page. Instead, in a complex scenario you could place RadAjaxManager instance on the main/master page and add a proxy control to the user control/content page. Find more information here.

Check it out and if the issue persists, I suggest that you open a formal support ticket and send us a runnable sample for further investigation.

Let me know how it goes.

Regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Tim
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or