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

issue with Ajax and dynamic controls

5 Answers 169 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Bert
Top achievements
Rank 1
Bert asked on 10 Sep 2008, 02:08 PM

Hi,


I'm creating a control dynamically with a lot of child controls (ex dropdownlists).

DropDownListControl ddlControl = (DropDownListControl)this.LoadControl("FormControls/DropDownListControl.ascx");  
ddlControl.ID = "ddlControl_" + groupTable.Rows.Count + "_" + columnIndex;  
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(this, ddlControl); 

With that last sentence I thougth the update the dynamic created dropdownlists if the parent usercontrol (this) was changed.

When I run this code and change the parent usercontrol he gives me the following exception:
Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ddlControl_1_0Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Can anyone tell me how I have to solve this without losing the creation of the dynamic child controls?

Thanks
Bert

5 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Sep 2008, 02:03 PM
Hi Bert,

Could you please open a regular support ticket and send us sample runnable project which replicates the described problem. We will test the application locally and will advise you further.

Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ade
Top achievements
Rank 1
answered on 24 Feb 2011, 05:41 PM
I am having the same issue with a multiview and ajaxmanager, i get this error..please help, i found nothing helpful on the forums yet:

Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_ParentTree_ParentTree_EntityTreePanel'.
 If it is being updated dynamically then it must be inside another UpdatePanel.
0
Maria Ilieva
Telerik team
answered on 25 Feb 2011, 04:52 PM
Hello Ade,

The descried error appears in cases you have nested UpdatePanels on the page. This means that if some control is updated with RadAjaxManager and with RadAjaxPanel or asp UpdatePanel at the same time the error could appear. Please elaborate a bit more on your scenario and the Ajax settings you have so we could further research on the problem.

All the best,
Maria Ilieva
the Telerik team

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Maria Ilieva
Telerik team
answered on 25 Feb 2011, 04:52 PM
Hello Ade,

The descried error appears in cases you have nested UpdatePanels on the page. This means that if some control is updated with RadAjaxManager and with RadAjaxPanel or asp UpdatePanel at the same time the error could appear. Please elaborate a bit more on your scenario and the Ajax settings you have so we could further research on the problem.

All the best,
Maria Ilieva
the Telerik team

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Ade
Top achievements
Rank 1
answered on 25 Feb 2011, 04:56 PM
hello Maria, i have posted more details on a new post here:

http://www.telerik.com/community/forums/aspnet-ajax/ajax/397790.aspx

thanks
Tags
Ajax
Asked by
Bert
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Ade
Top achievements
Rank 1
Share this question
or