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

Several Loading Panels in a Page

4 Answers 91 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Preetam Ray
Top achievements
Rank 1
Preetam Ray asked on 05 Apr 2010, 10:21 PM
I have a Web Form which contains a user control say x. User control x contains several instances of a single user control y.
y contains a loading panel in which a image is present for display on click of a particular button. Say i repeat user control y 3 or 4 times on the user control x.

The loading panel in my case contains the image that needs to be displayed on click of a button. So, when the form is loaded i would have 3 or 4 loading panels and also its corresponding 3 or 4 proxies.

<telerik:RadAjaxLoadingPanel height="30" width="100" isSticky="true" id="loadingPane" runat="server" style="position:absolute;">
                    <asp:Image id="loadingImg" runat="server" ImageUrl="/_layouts/images/factiva/loading.gif" AlternateText="Loading..." BorderWidth="0"></asp:Image>
                </telerik:RadAjaxLoadingPanel>

<asp:Panel id="searchTreePanel" runat="server">
                        <telerik:RadTreeview id="rSTreeView" runat="server" EnableEmbeddedSkins="false" Skin="FactivaGray"></telerik:RadTreeview>                        
                        </asp:Panel>

<telerik:RadAjaxManagerProxy id="rAjaxManager" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="searchGo">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="searchTreePanel" LoadingPanelID="loadingPane" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

The issue i am facing is that no matter i click any of the three or four searchGo buttons i get the same image loaded and not the different one.
Any help would be great.




4 Answers, 1 is accepted

Sort by
0
Preetam Ray
Top achievements
Rank 1
answered on 06 Apr 2010, 04:15 PM
Is there someone who could help me on this?
0
farsica
Top achievements
Rank 1
answered on 06 Apr 2010, 07:36 PM
when using radajaxmanager for each control that update by it show loading image.
if you want to show just 1 loader image in your page like gmail/yahoo dosn't use RadAjaxLoadingPanel. then you need to use OnRequestStart and OnResponseEnd events of RadAjaxManager.
in OnRequestStart event you must add function to show your loader image and on OnResponseEnd hide it.
you can create a div with a image inside it with (<div id="divId" style="display:none;"><img src="" alt=""/></div>), then at OnRequestStart  set for example $get("divId").style.display="visible"   and at OnResponseEnd $get("divId").style.display="none"
0
Preetam Ray
Top achievements
Rank 1
answered on 07 Apr 2010, 03:26 PM
Am sorry, i really did not understand your first line.. Can you explain.
Further, as i explained each usercontrol i add to the parent user control contains a loading image, and i need to show that particular loading image for that particular update. This parent user control is then placed in the web page.
0
farsica
Top achievements
Rank 1
answered on 07 Apr 2010, 07:58 PM
the first line says that when with ajaxmanager you control for example 3 page controls,it show 3 image loader.
in your senario ajaxmanager find 4 control with id "searchGo" therefore show loader image for all.
if you want to each part has its loader image you can use radajaxpanel instead of radajaxmanager
Tags
Ajax
Asked by
Preetam Ray
Top achievements
Rank 1
Answers by
Preetam Ray
Top achievements
Rank 1
farsica
Top achievements
Rank 1
Share this question
or