Display individual RadAjaxLoadingPanel while many controls are loading


Better Afternoon
I am trying to use RadAjax to establish many more SharePoint WebParts this each reach out to remote datasources, databind then display thier raw data. I am encountering an point arranging individual loading panels while those controls create thier initial load (This can be lengthy, few second apiece).
The behviour I am looking for is to have individual RadAjaxUpdatePanels shown while each control is loading. I have followed the illustration outlined here (http: www.telerik.com advise aspnet-ajax ajxshowloadingpaneloninitialpageload.html) and this work quite well, provided this not more than only one illustration of the webpart appears on a given page or some other webpart this impliments this solution.
Attached to this solution is a simplified version of the WebPart logic this substitudes the databinding with a
System.Threading.Thread.Sleep call to copy the call to an external resource.
When more than one illustration of the same part this impliments this login is present on a page, only the call back seems to occure, by this I mean this at the same illustration (after the prescribbed delay) the callback renders both webparts simultainiously.
When instances of dissimilar WebParts implimenting this logic are on a given page, only the second callback appears to occure and only the last webpart is rendered after the prescribed delay.
I Wish this this is enough to make the point clear enough to address. Underneath is the source of the WebPart in it is entirety;
MyWeek WebPart Code part
MyWeekPart.cs


usingSystem;


usingSystem.Text;


usingSystem.collections.Generic;


usingSystem.Web;


usingSystem.Web.UI;


usingSystem.Web.UI.WebControls;


usingSystem.Web.UI.WebControls.WebParts;


usingMicrosoft.Practices.SPG.Common.Logging;


usingMicrosoft.Practices.SPG.Common.ServiceLocation;


usingTelerik.Web.UI;


usingNipissingU.Portal.Common.ExceptionHandling;


usingNipissingU.Portal.Common.Entities;


usingNipissingU.Portal.Colleague.Repositories;


usingNipissingU.Portal.Common.Benefit;





namespaceNipissingU.Portal.WebPart.MyWeek


{


publicclassMyWeekPart:Microsoft.SharePoint.WebPartPages.WebPart


{


#regionFields...


privateControlmyWeekControl;


privatePanelPanel1;


privatePanelPanel2;


privateRadAjaxLoadingPanelRadAjaxLoadingPanel1;





#endregion





#regionProperties...


IErrorVisualizerErrorVisualizer{get;set;}


#endregion








#regionOverriddenMethods...


protectedoverridevoidOnInit(EventArgse)


{


base.OnInit(e);





ScriptManagerscriptManager=ScriptManager.GetCurrent(this.Page);


if(scriptManager==null)


{


scriptManager=newRadScriptManager();


this.Page.Form.Controls.AddAt(0,scriptManager);


}





Page.clientScript.RegisterStartupScript(typeof(MyWeekPart),this.ID,"_spOriginalFormAction=document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;",true);


if(this.Page.Form =null)


{


stringformOnSubmitAtt=this.Page.Form.Attributes["onsubmit"];


if( string.IsNullOrEmpty(formOnSubmitAtt)&&formOnSubmitAtt=="return_spFormOnSubmitWrapper();")


{


this.Page.Form.Attributes["onsubmit"]="_spFormOnSubmitWrapper();";


}


}


}





protectedoverridevoidOnLoad(EventArgse)


{


base.OnLoad(e);





ErrorVisualizererrorVisualizer=newErrorVisualizer();


this.ErrorVisualizer=errorVisualizer;





try


{


this.Controls.add(errorVisualizer);





LoadtheUserControlTemplatefromthe TEMPLATE CONTROLTEMPLATESdirectory.


myWeekControl=Page.LoadControl(" _controltemplates NipissingU MyWeekControl.ascx");





AddtheLoadedcontroltotheWebPartsControlcollection.Thisisimportantto


establishtheChildControlEvents


errorVisualizer.Controls.add(myWeekControl);





Panel1=myWeekControl.FindControl("Panel1")asPanel;


Panel2=Panel1.FindControl("Panel2")asPanel;


RadAjaxLoadingPanel1=myWeekControl.FindControl("RadAjaxLoadingPanel1")asRadAjaxLoadingPanel;





RadAjaxManagerAjaxManager1=RadAjaxManager.GetCurrent(this.Page);


if(AjaxManager1==null)


{


AjaxManager1=newRadAjaxManager();


AjaxManager1.ID="RadAjaxManager1";


Controls.add(AjaxManager1);


this.Page.items.add(typeof(RadAjaxManager),AjaxManager1);


}





AjaxManager1.AjaxRequest+=newRadAjaxControl.AjaxRequestDelegate(MyWeekPart_AjaxRequest);


}


catch(Exceptionex)


{


newViewExceptionHandler().HandleViewException(ex,this.ErrorVisualizer,


Constants.FriendlyError);


}


}





protectedoverridevoidOnPreRender(EventArgse)


{


base.OnPreRender(e);





if( this.CheckForWebPartDisplayMode(WebPartManager.BrowseDisplayMode))


{


newViewExceptionHandler().ShowfunctionalErrorMessage(Constants.DisplayModeError,this.ErrorVisualizer);


}


}


#endregion





#regionEvents...


protectedvoidMyWeekPart_AjaxRequest(Objectsender,Telerik.Web.UI.AjaxRequestEventArgse)


{


try


{


if(e.Argument=="MyWeekLoad")


{


System.Threading.Thread.Sleep(2000);


Panel2.Visible=true;





LabelLabel2=newLabel();


Label2.Text=e.Argument;


Panel2.Controls.add(Label2);


}


}


catch(Exceptionex)


{





}


}


#endregion





#regionPrivateMethods...


protectedboolCheckForWebPartDisplayMode(WebPartDisplayModemode)


{


boolflag=false;


if((base.WebPartManager =null)&&(base.WebPartManager.DisplayMode==mode))


{


flag=true;


}


returnflag;


}


#endregion


}


}




Constants.cs


usingSystem;





namespaceNipissingU.Portal.WebPart.MyWeek


{


publicstaticclassConstants


{


publicstaticstringFriendlyError="MyWeekiscurrentlyunavailable.Pleasetryagainlater.";


publicstaticstringDisplayModeError="Thepageisineditmode.Toshowthecontentsofthiswebpart,closethetoolbarorrefreshthewebpart.";


}


}




MyWeekControl.aspx


< @ControlLanguage="C#"AutoEventWireup="true"Inherits="NipissingU.Portal.WebPart.MyWeek.MyWeekControl,NipissingU.Portal.WebPart.MyWeek,Version=1.0.0.0,Culture=neutral,PublicKeyToken=fc876b2c4bf21e29" >


< @RegisterTagPrefix="telerik"Namespace="Telerik.Web.UI"Assembly="Telerik.Web.UI,Version=2009.3.1314.35,Culture=neutral,PublicKeyToken=121fae78165ba3d4" >





<telerik:RadScriptBlockID="RadScriptBlock1"runat="server">


<scripttype="text JS">


functionaddLoadEvent(func)


{


varoldonload=window.onload;


if(typeofwindow.onload ='function')


{


window.onload=func;


}


else


{


window.onload=function(){


if(oldonload)


{


oldonload();


}


func();


}


}


}





functionMyWeek_OnLoad()


{


setTimeout(function(){window["< =RadAjaxManager.GetCurrent(this.Page).clientID >"].ajaxRequest("MyWeekLoad");},50);


}





addLoadEvent(MyWeek_OnLoad);


script>


telerik:RadScriptBlock>





<styletype="text css">


.module1


{


background-color:#dff3ff;


border:1pxsolid#c6e1f2;


}


style>





<telerik:RadAjaxManagerProxyID="AjaxManagerProxy1"runat="server">


<AjaxSettings>


<telerik:AjaxSettingAjaxControlID="Panel1">


<UpdatedControls>


<telerik:AjaxUpdatedControlControlID="Panel1"LoadingPanelID="RadAjaxLoadingPanel1" >


UpdatedControls>


telerik:AjaxSetting>


<telerik:AjaxSettingAjaxControlID="RadAjaxManager1">


<UpdatedControls>


<telerik:AjaxUpdatedControlControlID="Panel1"LoadingPanelID="RadAjaxLoadingPanel1" >


UpdatedControls>


telerik:AjaxSetting>


AjaxSettings>


telerik:RadAjaxManagerProxy>





<fieldsetclass="module1">


<asp:PanelID="Panel1"runat="server"HorizontalAlign="Center"Height="150px">


<asp:PanelID="Panel2"runat="server"Visible="False">


<asp:ButtonID="Button1"runat="server"Text="Clicktoseetheloadingimage"OnClick="Button1_Left click"


Style="margin-top:15px;margin-left:15px" >


<br >


<asp:LabelID="Label1"runat="server"Text="BeforeAjax...">asp:Label>


asp:Panel>


asp:Panel>


fieldset>





<telerik:RadAjaxLoadingPanelID="RadAjaxLoadingPanel1"runat="server">


<divalign="center"class="nu-loadingpanel-container">


<divclass="dt-bigthrobber"> div>


<div>Loading...div>


div>


telerik:RadAjaxLoadingPanel>







MyWeekControl.cs


usingSystem;


usingSystem.Raw data;


usingSystem.Configuration;


usingSystem.collections;


usingSystem.Web;


usingSystem.Web.Security;


usingSystem.Web.UI;


usingSystem.Web.UI.WebControls;


usingSystem.Web.UI.WebControls.WebParts;


usingSystem.Web.UI.HtmlControls;


usingTelerik.Web.UI;





namespaceNipissingU.Portal.WebPart.MyWeek


{


publicpartialclassMyWeekControl:System.Web.UI.UserControl


{


#regionFields...


protectedLabelLabel1;


protectedPanelPanel1;


protectedButtonButton1;


protectedRadAjaxLoadingPanelRadAjaxLoadingPanel1;


#endregion





protectedvoidButton1_Left click(Objectsender,EventArgse)


{


System.Threading.Thread.Sleep(2000);


Label1.Text=DateTime.Now.ToLongTimeString();


}


}


}




Christian, Christian,
To overcome this behavior you can set the RadAjaxPanel RadAjaxManager RequestQueueSize property as described here,so it handles the many requests.
All the better,
Pavlina
the Telerik team
Do you wish to have your 's say when we set our development plans Do you wish to understand when a feature you concern about is added or when a error fixed Explore the Telerik Public Point tracking system and vote to affect the priority of the items


View Complete with Replies


RELATED TOPICS OF Ajax Control PROGRAMMING LANGUAGE




how to to show the problem in my form form - Ajax Forum - ASP.NET Controls

I have a forgot password form form. in that form i am asking user to enter his mail id. and after this depend on his mail id I wish to to show his security problem  as a succeeding field in the same form.  after answering t
VIEWS ON THIS POST

42

Posted on:
Thursday, September 20, 2012
View Replies !

RadAjaxLoadingPanel not to show when inside content form - Ajax Forum - ASP.NET Controls

Hello
It seems the one property this was missing in your 's examples is the "Skin" property of RadAjaxLoadingPanel. Tobe ableto view theloading image, you require to set the Skin property to some of the valid Telerik skins (like Vista, Black, Hay, Outlook, and m

VIEWS ON THIS POST

151

Posted on:
Friday, September 21, 2012
View Replies !

Jquery Ajax call to ASPX form not arranging datatble in radgrid - Ajax Forum - ASP.NET Controls

I figured that out myself.

VIEWS ON THIS POST

115

Posted on:
Friday, September 21, 2012
View Replies !

RadAjaxManager loading/displaying controls in reverse order - Ajax Forum - ASP.NET Controls

I am upgrading 2008 Q3 version of telerik control to 2011 Q3 version in my project in .NET 4.0. I have a RadAjaxManager used in the form this has a edited control as asp:panel. Many user controls are dynamically loaded in to the asp:panel. Initally all the illustration
VIEWS ON THIS POST

66

Posted on:
Friday, September 21, 2012
View Replies !

RadAjaxLoadingPanel not arranging - Ajax Forum - ASP.NET Controls

I have a RadGrid and an RadAjaxLoadingPanel and wire them together. I pick to rewrite a row of the grid with in an Rewrite Form template and if I left click on the revise or cancel buttons of my rewrite form the RadAjaxLoadingPanel displays as normal.
VIEWS ON THIS POST

63

Posted on:
Saturday, September 22, 2012
View Replies !

How to to show .rtf file(stream) content in RadEditor using LoadRtfContent() ? - Ajax Forum - ASP.NET Controls


I struggling to to show.rtf file content in RadEditor using LoadRtfContent(stream) method.In rtf file contains tables & images,In radeditor, i am incapable to to show tables & images.Plz deliver me some answer for my problem.Plz find

VIEWS ON THIS POST

109

Posted on:
Saturday, September 22, 2012
View Replies !

RadAjaxLoadingPanel with image/Text does not to show in the center screen - Ajax Forum - ASP.NET Controls

Phuc
To achieve the deed functionality youcan attempt toadd a RadAjaxManager control to the master form and
set its DefaultLoadingPanelID to the ID of the RadAjaxLoadingPanel situated on
the master form. Then you require to handle the manager OnRequestStart

VIEWS ON THIS POST

38

Posted on:
Saturday, September 22, 2012
View Replies !

displayed once loadingpanel - Ajax Forum - ASP.NET Controls

The loading panel shows the first time.
HttpAnalyzer first time:<table id="ctl39_RadioButtonList_Target" class="radiobuttonlist-default" border="0" style="width:100 ;">
<tr>
<td><input id="ctl39_RadioButtonList_Target_0" type="radio" name="ctl39$RadioBut

VIEWS ON THIS POST

74

Posted on:
Monday, September 24, 2012
View Replies !

RadAjaxLoadingPanel Loading image not shown for user controls - Ajax Forum - ASP.NET Controls

Hello
I've compile into a strange point with the RadAjaxLoadingPanel whereby the panel appears properly, but not the default loading icon.
I have primarily Created a version of the Wizard illustration in the Telerik demos:
http: demos.telerik.com aspnet-a

VIEWS ON THIS POST

115

Posted on:
Tuesday, September 25, 2012
View Replies !

RightContextMenu on shown on right left click on RadMenu item in IE8 - Ajax Forum - ASP.NET Controls


We are using telerik controls in our app the trouble this we are facing is this the right context menu is not shown on right left click on the RadMenu item in IE8 . I am not able to solve out why this is occurrence . Plz advise

VIEWS ON THIS POST

124

Posted on:
Tuesday, September 25, 2012
View Replies !

RadAjaxLoadingPanel not arranging on RadGrid Filter - Ajax Forum - ASP.NET Controls

Eric
I followed your 's scenario and prepared a sample project this is working as expected. Plz deliver it a attempt and let me understand if it work for you or you require further assistance.

VIEWS ON THIS POST

138

Posted on:
Tuesday, September 25, 2012
View Replies !

Content in MasterPage not arranging - Ajax Forum - ASP.NET Controls

Tony
I reviewed your 's code part and it looks correct to me. I alsotried to replicate the trouble on my side but to no avail. Find attached a sample runnable app which demonstrates the correct functionality of the problematic part of your code. Test it locally and ve

VIEWS ON THIS POST

96

Posted on:
Wednesday, September 26, 2012
View Replies !

loading panel shown after canceling partial postback. - Ajax Forum - ASP.NET Controls

A loading panel is shown after canceling a partial postback in JS on the PageRequestManagers InitalizeRequest event handler. How can i catch rid of the loading panel Is there some other way to cancel the partial postback
Ihave radio buttons in the command selec

VIEWS ON THIS POST

100

Posted on:
Wednesday, September 26, 2012
View Replies !

ajax Popup Extender is not shown in postback - Ajax Forum - ASP.NET Controls


I am using PopupExtender. In Rad grid in each row I have an image button.. While clicking this am opening the pop extender. Its working fine. But am filling grid in a button left click event which will throw a JS confirm alert. if i press yes then in postback i will rebind t

VIEWS ON THIS POST

80

Posted on:
Wednesday, September 26, 2012
View Replies !

No RadAjaxLoadingPanel animation when content is ?to show: none? - Ajax Forum - ASP.NET Controls

Kristijan
The behavior you experienced is instead of expected. The RadAjaxLoadingPanel can not calculate its dimentions as there are no visible controls depend on which to do it, it is not shown. The easiest way to overcome that, is to position the RadAjaxLoadin

VIEWS ON THIS POST

91

Posted on:
Thursday, September 27, 2012
View Replies !

RadAjaxLoadingPanel not shown

Hello
I'm struggling to use the control RadAjaxLoadingPanelbased on the demo http: demos.telerik.com aspnet-ajax ajax examples loadingpanel loadingimages defaultcs.aspx .
For unkown reason, it is not working, the RadAjaxLoadingPanelcontrol is not shown.
Note: I'm using the

VIEWS ON THIS POST

50

Posted on:
Saturday, September 29, 2012
View Replies !

IE9 Ajax to show

I have downloaded IE9 and just now installed the latest version of Telerik ASP.NET Ajax controls. I have found this when the ajax spinner is spinning the screen behind it is now turning white when it should be grayed out just like before. However when in compatability visualize
VIEWS ON THIS POST

64

Posted on:
Saturday, September 29, 2012
View Replies !

Formview edited values not shown on the first button left click

Hello
I havefollowing labels (updtlbl1,updtlbl2,updtlbl3) inside a form visualize, Theyare edited by a button(btnSave) outside the formview.
I am updating the Relational db with entity modeland I am using RadAjaxmanagerI have the code part as underneath.Raw

VIEWS ON THIS POST

55

Posted on:
Saturday, September 29, 2012
View Replies !

Generic way of arranging error message in master form while using RadAjaxManagerProxy


I have a master form whenere my RadAjaxManager is added and in the content pages I have RadAjaxManagerProxy .
Now I wish to to show success failure messages on the content form events like (button clicks , grid revise combobox changed and much

VIEWS ON THIS POST

55

Posted on:
Sunday, September 30, 2012
View Replies !

loading.gif not shown in RadAjaxLoadingPanel with Internet Explorer

I have a RadAjaxLoadingPanel which has a gif image loaded by GetWebResourceUrl function. When I make an ajax postback the loading panel is shown (a gray panel covering all the controls in the form) but the gif inside the loading panel is not shown. That only happens with
VIEWS ON THIS POST

69

Posted on:
Sunday, September 30, 2012
View Replies !

  • T = 0

  • Copyright 2012 © SolveThisError.com. All rights reserved. Terms of use  |  Privacy Policy