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

user controls - loading-panel no show

2 Answers 149 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 12 Sep 2008, 09:16 PM
hello,

i am using a MasterPage that has a RadAjaxLoadingPanel under the ContentPlaceHolder. normally this is cool and it works w/ various WebContentForm's RadAjaxPanels that refer to this RadAjaxLoadingPanel by ID.

however, the RadAjaxLoadingPanel doesnt seem to work for the UserControls managed via a RadAjaxManager.

for ex, i use a RadAjaxManager to manage two UserControls (which themselves contain RadGrids, etc) and a Button on a WebContentForm. instead of showing up, the animation is nowhere to be found. this is problematic for long operations.

what could cause a RadAjaxLoadingPanel not to work in somecases, when it works fine in others?

here's where it doesnt show up:

<asp:Content ID="Content1" ContentPlaceHolderID="phContent" runat="server"
 
    <h1>User Manager</h1> 
     
    <Foo:RolesManager ID="ucRolesManager" runat="server" visible="true"/> 
     
    <p><b>Add Users</b></p
    <Foo:AdUserSearch ID="ucAdUserSearch" runat="server" visible="true"/><br /> 
     
    <asp:Button ID="btnAddUsers" Text="Add Users to Role" OnClick="btnAddUsers_Click" Visible="false" runat="server" /> 
     
 
     
     
    <!-- AJAX MANAGER - "ajaxLoadingPanel" is from MasterPage --> 
 
    <Telerik:RadAjaxManager ID="radAjaxManager" runat="server"
        <AjaxSettings> 
            <%-- RolesManager updates itself --%> 
            <Telerik:AjaxSetting AjaxControlID="ucRolesManager"
                <UpdatedControls> 
                    <Telerik:AjaxUpdatedControl ControlID="ucRolesManager" LoadingPanelID="ajaxLoadingPanel" /> 
                </UpdatedControls> 
            </Telerik:AjaxSetting> 
            <%-- UserSearch updates itself and add-user-button --%> 
            <Telerik:AjaxSetting AjaxControlID="ucAdUserSearch"
                <UpdatedControls> 
                    <Telerik:AjaxUpdatedControl ControlID="ucAdUserSearch" LoadingPanelID="ajaxLoadingPanel" /> 
                    <Telerik:AjaxUpdatedControl ControlID="btnAddUsers" LoadingPanelID="ajaxLoadingPanel" /> 
                </UpdatedControls> 
            </Telerik:AjaxSetting> 
            <%-- AddUsers Button updates RolesManager, UserSearch --%> 
            <Telerik:AjaxSetting AjaxControlID="btnAddUsers"
                <UpdatedControls> 
                    <Telerik:AjaxUpdatedControl ControlID="ucRolesManager" LoadingPanelID="ajaxLoadingPanel" /> 
                    <Telerik:AjaxUpdatedControl ControlID="ucAdUserSearch" LoadingPanelID="ajaxLoadingPanel" /> 
                </UpdatedControls> 
            </Telerik:AjaxSetting> 
        </AjaxSettings> 
    </Telerik:RadAjaxManager> 
     
</asp:Content> 


thanks!
matt

2 Answers, 1 is accepted

Sort by
0
matt
Top achievements
Rank 1
answered on 30 Oct 2008, 03:46 PM
anything on this telerik? thanks!
0
Steve Keating
Top achievements
Rank 1
answered on 09 Jan 2009, 02:46 AM
Matt,

First see my post here:
http://www.telerik.com/community/forums/aspnet-ajax/ajax/radajaxloadingpanel-work-w-usercontrols.aspx#715174

Here's some additional info that may help...

a design similar to this will support you global objects working across the entire site whether it is a single page application or a multi page site.

Piece 1) Master Page -> contains panels which define areas of updateable content -> in the panels are either User Controls (Navigation, breadcrumb, Title header, etc) or individual telerik / UI controls (Radsplitter, textboxes, buttons, etc). Also, the Master page will need to contain a ScriptManager, a RadAjaxManager, and any other neccessary Ajax framework / global controls (maybe radwindowmanager for pop-ups, radtoolbar, etc)

Piece 2) an inheritable class and a content page (this can be one and the same) which exposes all the global application objects mentioned above (Panels, radcontrols, etc, anything you want downlevel user controls to be able to use / modify.  (Technically this can be exposed directly through the master page but according to microsoft practises, the masterpage is supposed to be mostly a layout template for controls rather than actual code for them).  Also this page should define global setup for updates of the controls (such as if Navigation always updates contentArea type things)

Piece 3) User Controls which get hosted on the content pages.  Because everything is exposed in the content page class(es), all user controls hosted on them have access to all the framework objects and can trigger updates between them and fire off the loading panels during those updates simply by using the <AjaxManager from contentpage>.ajaxSettings.AddAjaxSetting(<control from this UC triggering update>, <UC panel wrapper from contentpage containing UC to be updated>, <AjaxLoading Panel> ) syntax mentioned in the other post i wrote above.

Using this sort of architecture, all my loading panels fire off perfectly with items inside user controls updating other user controls and panels etc. 

If you need more help, just post and I'll do what I can.

thanks,
Steve Keating 
Tags
Ajax
Asked by
matt
Top achievements
Rank 1
Answers by
matt
Top achievements
Rank 1
Steve Keating
Top achievements
Rank 1
Share this question
or