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

[Solved] Issue with radajaxmanager and radajaxpanel

1 Answer 179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kris
Top achievements
Rank 1
Kris asked on 22 Apr 2013, 09:20 PM
Hi, 
       here is the structure of my page:

Radajaxmanager

<radajajaxpanel>
<radajajaxpanel id = "1">

</radajajaxpanel>
<radajajaxpanel id="2">

</radajajaxpanel>
</radajajaxpanel>

So basically I have radajaxmanager and radajaxpanel on the same page and also radajaxpanel has 2 radajaxpanels inside it. It was working fine in version 2008 but after upgrading to 2012 , its throwing following error :

Microsoft JScript runtime error: Sys.InvalidOperationException: A control is already associated with the element.

This error is happening for the one of the nested ajaxpanel element. I have inherited this application and wanted to make it faster by using cdn feature of version 2012. Is there any way to make it work without redesigning the complete application as this is the common page architecture across the application. Thanks.

Regards
Kris

1 Answer, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 24 Apr 2013, 01:52 PM
Hello Kris,

It is not recommended to use the RadAjaxManager in combination with RadAjaxPanel at the same time. Since they are using some common client side scripts, and the updating of the ViewState of the inner controls can fail in some scenarios. See this help topic for more information:
http://www.telerik.com/help/aspnet-ajax/ajax-controls-in-ajaxpanel-and-ajaxsettings.html

Now, there are several options to resolve the issue. One of them is to use asp:Panels instead of the RadAjaxPanels, and to create such settings in your RadAjaxManager, that each one of these asp panels to update itself. This should work correct in your case.
Another options is to remove the RadAjaxManager, and place another RadAjaxPanel, wrapping the controls that are currently ajaxified by the manager.

Please note that this error that you are getting could happen if you are making ajax call from control that is not longer in your page. For example if you are adding dynamically button too late in the Asp Page Lifecycle (for example on PreRender), and the button is not there during the PageLoad of the next Postback.

If swapping the RadAjaxPanels with ajaxified asp:Panels does not fix the issue, we will need more details about your problem to resolve it. In this case please try to insulate the issue in sample page that we could test here. Or at least give us more details on how you are adding this panels to the page(asp markup or code behind), if you are changing the UpdateMode and/or if you are using master/content pages.

All the best,
Venelin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Kris
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Share this question
or