Nested user controls and RadAjaxManagerProxy

2 posts, 0 answers
  1. soporte pasiona
    soporte pasiona avatar
    2 posts
    Member since:
    Oct 2009

    Posted 15 Feb 2012 Link to this post

    We have a problem with RadAjaxManagerProxy with user controls. We changed the physical ASPX pages into ASCX controls and we load them from a single Default.aspx page. We use RadGrid together with RadComboBox controls to implement filtering and data loading into the grid.

    When the pages containing the grid were hosted in a single ASPX page, they worked ok.

    When the pages were converted into ASCX controls, we had to put a RadAjaxManagerProxy in them to refer to the master RadAjaxManager inside the master page. However, we have issues when the controls are interacted with.

    One concrete example of the error we face is this one:

    • We have a User Control (First.ascx) with a RadGrid and a second ASCX nested inside. Both controls are set as updated by a RadAjaxManagerProxy.
    • This second ASCX control (Filter.ascx) has a RadComboBox and the control class exposes a public property to let the parent control get its filtered value. This control also has a RadAjaxManagerProxy, updating the combo boxes.
    • A Default.aspx page loads the first control and displays it OK (the grid and the nested user control). When we change the combo box value (this is inside the second user control), the loading panel is displayed (as expected) but it never ends. The server-side event for the RadComboBox is correctly processed and ends but the loading panel still shows the loading animation.
    • When the First.ascx was First.aspx (with the same markup and codebehind), the Filter.ascx behave correctly. The error began when we changed it into ASCX.

    The other error we face is when we export a RadGrid contents as an Excel file with ExportToExcel method, the method executes but no result is shown to the browser. When the ASCX control having the grid with RadAjaxManagerProxy was a standalone ASPX page with RadAjaxManager, the export was done well.

    It seems that somehow the RadAjaxManager doesn't get notified when the postback ends.
  2. Tsvetina
    Admin
    Tsvetina avatar
    2481 posts

    Posted 20 Feb 2012 Link to this post

    Hi Soporte,

    Please note that nested ajax settings are by default a not supported scenario and if you have such, it is expected that they do not behave correctly. This would be if for example you have a setting on Default.aspx that causes the whole First.ascx to update itself and then inside it you have another setting that also causes ajax requests.
    My advice is to use Firebug's console or a similar tool and check if all ajax requests execute without errors. It is quite possible that some of them are broken (never return response, thus the loading panel is not hidden).

    As for exporting, can you confirm that you export the grid through a full page postback? As you probably know export is not supported during AJAX requests. Tips on exporting from ajaxified grid are available here:
    http://www.telerik.com/help/aspnet-ajax/grid-export-with-ajax-enabled.html

    All the best,
    Tsvetina
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top