issue with Ajax and dynamic controls

6 posts, 0 answers
  1. Bert
    Bert avatar
    13 posts
    Member since:
    Jul 2008

    Posted 10 Sep 2008 Link to this post

    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

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 11 Sep 2008 Link to this post

    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.
  3. Ade
    Ade avatar
    4 posts
    Member since:
    Feb 2011

    Posted 24 Feb 2011 Link to this post

    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.
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 25 Feb 2011 Link to this post

    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!
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 25 Feb 2011 Link to this post

    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!
  6. Ade
    Ade avatar
    4 posts
    Member since:
    Feb 2011

    Posted 25 Feb 2011 Link to this post

    hello Maria, i have posted more details on a new post here:

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

    thanks
Back to Top