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

Trouble viewing multiple radajaxloadingpanel with usercontrols

4 Answers 149 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Bridge24
Top achievements
Rank 1
Iron
Iron
Bridge24 asked on 26 Jan 2009, 06:36 PM
I have a web page with multiple blocs that can be updated individually, every bloc is a usercontrol.

These usercontrols are in an ASPX and I have a masterpage.

When I click a list on top of my page, I want to update 3 usercontrol below and have the ajaxloadingpanel visible on top of every usercontrol, so if they take longer to update, every UC will have its ajaxupdate disappearing not at the same time.

When I do my select action on the top control, this radgrid is ajax updated and I see the loadingpanel on top of it.  Also, my 3 usercontrol are ajax-updated successfully, but I do not see the loadingpanel on top of them.

Details: the dgproducts table is ajax updated and I see the default loadingpanel from the masterpage on top of it.
The ProductlinkUC, ProductCountryUC and ProductCategoryUC ARE ajax-updated but I do not see the loadingpanel on top of them.
What I am doing wrong?

masterpage:
    <form id="form1" runat="server" style="height: 100%;"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Transparency="1" 
        Width="75px"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
 
aspx page:
<asp:Content ID="Content2" ContentPlaceHolderID="CenterContent" runat="server"
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="dgproducts" EventName="SelectedIndexChanged"
                <UpdatedControls> 
<!-- I DO NOT SEE UPDATEPANEL FOR THIS CONTROL AND THE 2 OTHERS UC --> 
                    <telerik:AjaxUpdatedControl ControlID="ProductLinkUC1"  LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="ProductCountryUC1" LoadingPanelID="RadAjaxLoadingPanel2" /> 
                    <telerik:AjaxUpdatedControl ControlID="ProductCategoryUC1" LoadingPanelID="RadAjaxLoadingPanel3" /> 
<!-- EVERYTHING OK FOR DGPRODUCTS --> 
                    <telerik:AjaxUpdatedControl ControlID="dgproducts" />  
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        Width="75px"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
 
(also loadingpanel2, loadingpanel3) 
... 
    <telerik:RadGrid ID="dgproducts" runat="server" AutoGenerateColumns="False" DataSourceID="dsproduct" 
        GridLines="None" Skin="WBS" EnableEmbeddedSkins="False" AllowAutomaticUpdates="true"
... 
    </telerik:RadGrid> 
    <table cellpadding="0" cellspacing="0" border="0"
        <tr> 
            <td style="vertical-align: top"
                <uc1:ProductLinkUC ID="ProductLinkUC1" runat="server" /> 
                <uc1:ProductCountryUC ID="ProductCountryUC1" runat="server" /> 
            </td> 
            <td style="vertical-align: top"
                <uc1:ProductCategoryUC ID="ProductCategoryUC1" runat="server" /> 
            </td> 
        </tr> 
    </table> 
 

4 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 29 Jan 2009, 12:30 PM
Hello Dani,

I went through your code and it looks fine to me. Could you try the attached sample and let me know if it works as desired and what differs in your case.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bridge24
Top achievements
Rank 1
Iron
Iron
answered on 04 Feb 2009, 02:21 PM
Thank you for your reply and this sample code.

I did some changes according to your sample, and it now works on my pages too!

What I did that was wrong:  I put the ControlID property of the AjaxUpdatedControl to the ID of my usercontrol.

I added an asp:panel over each usercontrol, and put the ControlID on this panel instead of the  ID of the usercontrol, and it now works fine!  And it solved another trouble I had on some other pages, where the RadAjaxLoadingPanel was not shown correctly on some browsers.  With an ASP:Panel, it solve all my problems.

Conclusion: When you use the RadAjaxManagerProxy, put asp:panels on the zones you want to update and use those panels ID when configuring  your ajax-updated zones.


0
Bridge24
Top achievements
Rank 1
Iron
Iron
answered on 04 Feb 2009, 03:12 PM
Additional informations to this post:

As you can see on my first post, I was using 3 RadAjaxLoadingPanel, thinking that 3 different ajax-enabled zones needs different loading panel.

I don't know how telerik do this, but you don't have to do this, I removed all of them and all my panels are updated at the same time by using the SAME default ajaxloadingpanel that is declared on my masterpage.  Wonderful !

0
Iana Tsolova
Telerik team
answered on 05 Feb 2009, 12:58 PM
Hi Dani,

I am happy to hear you have found a solution for you case.

And I have to add that one should wrap their user control in Panels as mentioned above if the controls change their visibility state, otherwise, it is more like suggested but obligatory.
And for the different RadAjaxLoadingPanel: RadAjaxManager does gives you the opportunity to display different loading panels over different updated areas. However you might use same or none loading panel as per your requirements. 

Greetings,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Bridge24
Top achievements
Rank 1
Iron
Iron
Answers by
Iana Tsolova
Telerik team
Bridge24
Top achievements
Rank 1
Iron
Iron
Share this question
or