RadAjaxManager and UpdatePanel.Update()

7 posts, 0 answers
  1. Will
    Will avatar
    30 posts
    Member since:
    Aug 2008

    Posted 06 Sep 2009 Link to this post

    There appears to be a bug in the way that the RadAjaxManager is updating UpdatePanels, plus the EventName attribute of the AjaxSetting element is not filtering events.  If an UpdatePanel named by an AjaxUpdatedControl element is triggered for an update by the RadAjaxManager, and you also execute the .Update() method of that UpdatePanel in your code, the entire contents of the update panel will be removed on the CallBack.

    I have been bending over backwards to work around this, but it really needs to be fixed.  In my code, I can execute the .Update() method of a single UpdatePanel as many times as I wish without any issues, so it is something in the way that the RadAjaxManager is handling this.  As for the EventName not filtering, there is no work-around.
  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 09 Sep 2009 Link to this post

    Hello Bill,

    I would like to recommend that you do not mix RadAjaxManager and asp:UpdatePanels.
    You can initiate a generic AJAX request by using the ajaxRequest function of the RadAjaxManager.
    For more information please take a look at the Client-side API help topic.

    Greetings,
    Mira
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Ricardo Ferreira
    Ricardo Ferreira avatar
    2 posts
    Member since:
    Sep 2009

    Posted 09 Sep 2009 Link to this post

    Hello

    I am trying to make several control that are generic to my application like webparts that are add the pages. The problem is the comunication between then, because 1 control can be updated by many diferent controls e can´t add the settings to ajaxmanager. For example control1 on page1 is updated by control10 , and control1 on page2 is updated by control 20.
     I made a kind off event nottifycation that allows to know that a expecific control needs to update the control recieves the event notifycation that is fired but what i dont know is how to fire updatepanel to reload all control i that panel. Can you help ?

    Thanks.
  4. Will
    Will avatar
    30 posts
    Member since:
    Aug 2008

    Posted 09 Sep 2009 Link to this post

    Hi Mira,

    First off, I'm talking about server-side code, so your reference to client-side code is not relevent.  The only reason that I am using the RadAjaxManager at all is because I want the LoadingPanels to overlay the UpdatePanels that are being updated.  This works great for all the controls within a single context (i.e. web form, master page, or user control), but it doesn't work if the web form makes a change to content on the master page.  The only way to update the contents of the master page from the web form is via a public method on the master page that executes the .Update() method of the UpdatePanel.

    If an event occurs and content is changed within the master page itself, it can be handled through the RadAjaxManager control on the master page and I don't need to use the .Update() method of the UpdatePanel.  However, if the event is triggered within the code behind of the web form, the RadAjaxManager control on the master page will not be trigered and the .Update() method of the UpdatePanel must be executed manually.  Because of both circumstances, I now need to add code to detect where the change originated from and to only execute the .Update()  method if it did not originate from the RadAjaxManager which is a major pain in the ass.  I would expect the RadAjaxManger to call the .Update() method itself, but it appears that it is doing something else altogether.

    Thanks,
    Bill

    P.S.  Is the EventName attribute broken?
  5. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 14 Sep 2009 Link to this post

    Hello Bill,

    Unfortunately the EventName property does not work as expected and we still cannot find a way to fix it. However, you can use the approach described in the MasterPages: ajaxify and update controls in master and content page help topic for your scenario.

    I hope this helps.

    Greetings,
    Mira
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Will
    Will avatar
    30 posts
    Member since:
    Aug 2008

    Posted 14 Sep 2009 Link to this post

    Hey Mira,

    I'll take a closer look at dynamically adding settings to the master page RadAjaxManager from the web content form, as that may work for us.  If we use that method, do we need to add the settings with each postback?  Or are the changes saved in the viewstate of the RadAjaxManager?  Also, shouldn't these changes be made during the Init event as opposed to Page_Load event?

    Thanks,
    Bill

    P.S. We have made certian controls like the RadAjaxManager, publicly available on the master page, so we have direct access to it from every web content form.  The <%@ MasterType VirtualPath="~/master/MyMaster.master" %> directive works wonders on web content forms.  :)
  7. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 17 Sep 2009 Link to this post

    Hello Bill,

    You should add the AJAX settings on each Page_Load/Page_PreRender. You cannot add AJAX settings dynamically in Page_Init event. It is too early in the page lifecycle since some of the controls taking palce in the ajax settings might not be created yet.
    For more information please take a look at the Add AjaxSettings programmatically help topic.

    For adding AJAX settings dynamically in content pages you can also
    get the Manager instance on the page through the GetCurrent static method - RadAjaxManager.GetCurrent(Page) .

    Kind regards,
    Mira
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top