Hi
I am trying to display rad ajax loading panel in a user control, but not able to see it.
any help will be appreciated.
please see my code below:
Panel 1 has several contols which are getting populated from db when i select an item in rad combo box.
I am initiating callback using following code:
following is code behind during page load
please help...
thanks
Manik Rawal
I am trying to display rad ajax loading panel in a user control, but not able to see it.
any help will be appreciated.
please see my code below:
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManagerProxy1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
Runat
=
"server"
Skin
=
"Default"
>
</
telerik:RadAjaxLoadingPanel
>
Panel 1 has several contols which are getting populated from db when i select an item in rad combo box.
I am initiating callback using following code:
<telerik:RadCodeBlock ID=
"RadCodeBlock1"
runat=
"server"
>
<script language=
"javascript"
>
function
Initiate_<%= ClientID %>(){
var
ajaxManager = $find(
"<%= RadAjaxManager.GetCurrent(Page).ClientID %>"
);
ajaxManager.ajaxRequest();
return
false
;
}
</script>
</telerik:RadCodeBlock>
Dim
manager
As
RadAjaxManager = RadAjaxManager.GetCurrent(Page)
AddHandler
manager.AjaxRequest,
AddressOf
manager_AjaxRequest
cmbLookUp.OnClientSelectedIndexChanged =
"Initiate_"
+
Me
.ClientID
please help...
thanks
Manik Rawal
10 Answers, 1 is accepted
0
Hello Manik,
You could resolve your issue by adding an ajax setting where the AjaxControlID to the main RadAjaxManager id. The loading panel does not show because the request is made from the RadAjaxManager and not from the RadAjaxManagerProxy.
Greetings,
Antonio Stoilkov
the Telerik team
You could resolve your issue by adding an ajax setting where the AjaxControlID to the main RadAjaxManager id. The loading panel does not show because the request is made from the RadAjaxManager and not from the RadAjaxManagerProxy.
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
EventArgs)
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadAjaxManager.GetCurrent(Page), Panel1, RadAjaxLoadingPanel1)
End
Sub
Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Manik
Top achievements
Rank 1
answered on 28 Dec 2011, 04:33 PM
Hi Antonio
this almost worked :)
but there is a little twist in the tale..
i want to use this user control more than once on the single page.
so when i select a value from dropdown, it shows the loading panel...but it is showing this panel in all the instances of the user control i have on the page.
i want to show this just on user control which is in current use.
thanks
Manik Rawal
this almost worked :)
but there is a little twist in the tale..
i want to use this user control more than once on the single page.
so when i select a value from dropdown, it shows the loading panel...but it is showing this panel in all the instances of the user control i have on the page.
i want to show this just on user control which is in current use.
thanks
Manik Rawal
0
Hello,
Regards,
Antonio Stoilkov
the Telerik team
You could achieve your scenario by applying the code below. Note that the control should be rapped in Panel in order for the RadAjaxLoadingPanel to show. This is necessary because the RadAjaxLoadingPanel needs wrapper to know where to appear.
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
>
<
cc:WebUserControl1
ID
=
"WebUserControl1"
runat
=
"server"
></
cc:WebUserControl1
>
</
asp:Panel
>
RadAjaxManager currentAjaxManger = RadAjaxManager.GetCurrent(Page);
foreach
(Control control
in
Panel1.Controls)
{
if
(control
is
WebUserControl1)
{
currentAjaxManger.AjaxSettings.AddAjaxSetting(currentAjaxManger, control.Parent, RadAjaxLoadingPanel1);
}
}
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Manik
Top achievements
Rank 1
answered on 29 Dec 2011, 03:08 PM
thanks a lot Antonio.
I made some changes in my code according to your previous post and it worked perfectly.
thanks again
Manik
I made some changes in my code according to your previous post and it worked perfectly.
thanks again
Manik
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 08 Feb 2012, 01:21 AM
Although the provided solution "works", it is just not what we want for a solution.
The whole point of using RadAjaxManagerProxy is to use it as a "proxy" to RadAjaxManager. We can ajaxify the ajaxRequest using the RadAjaxManagerProxy withOUT code. It makes no sense to have that, but then need to add all this code just to get a stupid LoadingPanel to show up on that same request. If you have ONE place in your application where you would need to do this...ok, but most of us have complex applications where we would need to do this sort of thing a million times, and I just can't see justifying taking the time to CODE the million places where ajaxRequests are done to handle showing a LoadingPanel when it should be as easy as attaching it to the updated control LIKE ANY OTHER ajax setting with an updated control.
If the Proxy can behind the scenes attach these Proxy ajax settings to the main RadAjaxManager, I can't think that attaching the loading panel at the same time (behind the scenes) would take too much time or effort to complete if this work item was put in the backlog.
Can we get it into the backlog?
Thanks.
The whole point of using RadAjaxManagerProxy is to use it as a "proxy" to RadAjaxManager. We can ajaxify the ajaxRequest using the RadAjaxManagerProxy withOUT code. It makes no sense to have that, but then need to add all this code just to get a stupid LoadingPanel to show up on that same request. If you have ONE place in your application where you would need to do this...ok, but most of us have complex applications where we would need to do this sort of thing a million times, and I just can't see justifying taking the time to CODE the million places where ajaxRequests are done to handle showing a LoadingPanel when it should be as easy as attaching it to the updated control LIKE ANY OTHER ajax setting with an updated control.
If the Proxy can behind the scenes attach these Proxy ajax settings to the main RadAjaxManager, I can't think that attaching the loading panel at the same time (behind the scenes) would take too much time or effort to complete if this work item was put in the backlog.
Can we get it into the backlog?
Thanks.
0
Hello Shawn,
When using RadAjaxManagerProxy showing RadAjaxLoadingPanel is automatic and there is no need for additional code. You could go through the help article below for more in depth information on the topic.
Additionally, if your scenario is more specific and you have questions related to it you could provide full description and sample code of your scenario so we could advise you further.
Regards,
Antonio Stoilkov
the Telerik team
When using RadAjaxManagerProxy showing RadAjaxLoadingPanel is automatic and there is no need for additional code. You could go through the help article below for more in depth information on the topic.
Additionally, if your scenario is more specific and you have questions related to it you could provide full description and sample code of your scenario so we could advise you further.
Regards,
Antonio Stoilkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 10 Feb 2012, 06:18 PM
"When using RadAjaxManagerProxy showing RadAjaxLoadingPanel is automatic and there is no need for additional code."
Umm... Yes there is a need for additional code according to YOU and your earlier post.
First, re-read my post (or read it for the first time).
The answer you gave had nothing to do with my point. I wasn't looking for RadAjaxManagerProxy/RadAjaxLoadingPanel 101 articles.
Next, re-visit Manik's original question/post and YOUR answer to it.
There wasn't ANYTHING "automatic" about YOUR ANSWER. You used code to get around it...when Manik (and everybody else) would assume that the RadAjaxLoadingPanel should show up with his declaritive settings for it.
The point of my post is...
If the "AJAX" setting works declaritively using the proxy (i.e. setting the RadAjaxManagerProxy as the initiator (for things such as ajaxRequest) and having things updated to the "Updated Control" in that setting), then why doesn't the LOADING PANEL attached to that same setting show up?? Your answer was because "the request was made from the RadAjaxManager NOT the proxy". Well, if that is the case, why does the declaritive proxy setting work at all then (for the ajax part?) If the "proxy" setting can be setup declaritively to handle the updates for ajaxRequests...(where I'm sure all the Telerik code is doing is passing that "proxy" info onto and hooking it up to the underlying RadAjaxManager), why can't it take ONE MORE PARAMETER and hook up the RadAjaxLoadingPanel ???...just like your (CODE) workaround to the situation?
A codeless (i.e. declaritive) solution for this scenario works if you are just using RadAjaxManager (and not the proxy). But let's get real here... Anybody doing a site with more than one page is going to need to use the Proxy. I can't imagine this being that hard of a thing for Telerik to add for the Proxy to be able to handle this from the declaritive settings...
Umm... Yes there is a need for additional code according to YOU and your earlier post.
First, re-read my post (or read it for the first time).
The answer you gave had nothing to do with my point. I wasn't looking for RadAjaxManagerProxy/RadAjaxLoadingPanel 101 articles.
Next, re-visit Manik's original question/post and YOUR answer to it.
There wasn't ANYTHING "automatic" about YOUR ANSWER. You used code to get around it...when Manik (and everybody else) would assume that the RadAjaxLoadingPanel should show up with his declaritive settings for it.
The point of my post is...
If the "AJAX" setting works declaritively using the proxy (i.e. setting the RadAjaxManagerProxy as the initiator (for things such as ajaxRequest) and having things updated to the "Updated Control" in that setting), then why doesn't the LOADING PANEL attached to that same setting show up?? Your answer was because "the request was made from the RadAjaxManager NOT the proxy". Well, if that is the case, why does the declaritive proxy setting work at all then (for the ajax part?) If the "proxy" setting can be setup declaritively to handle the updates for ajaxRequests...(where I'm sure all the Telerik code is doing is passing that "proxy" info onto and hooking it up to the underlying RadAjaxManager), why can't it take ONE MORE PARAMETER and hook up the RadAjaxLoadingPanel ???...just like your (CODE) workaround to the situation?
A codeless (i.e. declaritive) solution for this scenario works if you are just using RadAjaxManager (and not the proxy). But let's get real here... Anybody doing a site with more than one page is going to need to use the Proxy. I can't imagine this being that hard of a thing for Telerik to add for the Proxy to be able to handle this from the declaritive settings...
0
Hello Shawn,
Sorry for the misunderstanding.
I have assembled a sample project demonstrating the discussed scenario with no code related to the RadAjaxManager in the code-behind. The difference from the Manik code is in the AjaxControlID which points to the RadAjaxManager on the master page instead of the proxy. You could observe on the sample project when clicking the Update button the RadAjaxLoadingPanel shows up without any additional code. Additionally, if you want loading panel to always show you could set the DefaultLoadingPanelID.
Regards,
Antonio Stoilkov
the Telerik team
Sorry for the misunderstanding.
I have assembled a sample project demonstrating the discussed scenario with no code related to the RadAjaxManager in the code-behind. The difference from the Manik code is in the AjaxControlID which points to the RadAjaxManager on the master page instead of the proxy. You could observe on the sample project when clicking the Update button the RadAjaxLoadingPanel shows up without any additional code. Additionally, if you want loading panel to always show you could set the DefaultLoadingPanelID.
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
Regards,
Antonio Stoilkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Gotcha
Top achievements
Rank 1
answered on 19 Mar 2012, 11:34 AM
I have the same problem as well and I'm not sure I'm doing it right.
I'm assuming Once a RadAjaxManager with a Default Loading panel is declared in the Template Master, then any rad ajax used by a page or a user control ( which calls the template) will also inherit the settings defined in the latter? Hence will use the same default panel without code?
My problem is that I have :
1. Template Master with the RadAjaxManager and a default loading panel
2. A Page which uses the Template in which I have a placeholder which loads a user control .On button click wihtin that page, it calls another User Control as a partial post back.
this is from my Template where I have the RadAjaxmanager and a LoadingPanel which I 'd like to use throughout the site
Also in my User controls, across the solution, I have RadAjaxManagerProxy... but without any LoadingPanel and without any explicit LoadingPanelID in my Updated Controls ( Again I am assuming that by default, any RadAjaxManagerProxy will inherit the settings from the RadAjaxManager from my Template ,, may be this is where I'm wrong)
If I remove the style:position absolute, I get an overlay but no loading icon ( spinning wheel) .
What am I doing wrong...
I'm assuming Once a RadAjaxManager with a Default Loading panel is declared in the Template Master, then any rad ajax used by a page or a user control ( which calls the template) will also inherit the settings defined in the latter? Hence will use the same default panel without code?
My problem is that I have :
1. Template Master with the RadAjaxManager and a default loading panel
2. A Page which uses the Template in which I have a placeholder which loads a user control .On button click wihtin that page, it calls another User Control as a partial post back.
this is from my Template where I have the RadAjaxmanager and a LoadingPanel which I 'd like to use throughout the site
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager_GM"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel_GM"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btNewUserSetUp"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"wndSetUp"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"btNewUserSetUp"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"wndSetUp"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"btNewUserSetUp"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel_GM"
runat
=
"server"
Skin
=
"Default"
IsSticky
=
"true"
style
=
"position:absolute;"
>
</
telerik:RadAjaxLoadingPanel
>
Also in my User controls, across the solution, I have RadAjaxManagerProxy... but without any LoadingPanel and without any explicit LoadingPanelID in my Updated Controls ( Again I am assuming that by default, any RadAjaxManagerProxy will inherit the settings from the RadAjaxManager from my Template ,, may be this is where I'm wrong)
If I remove the style:position absolute, I get an overlay but no loading icon ( spinning wheel) .
What am I doing wrong...
0
Hi ,
You could resolve your issue by changing the RadAjaxLoadingPanel declaration to one of the shown below:
When declaring RadAjaxManagerProxy inherits its settings from RadAjaxManager but you could explicitly set loading panel for every AjaxUpdatedControl. Additionally, you could go through the help article below for more information on the topic.
Greetings,
Antonio Stoilkov
the Telerik team
You could resolve your issue by changing the RadAjaxLoadingPanel declaration to one of the shown below:
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel_GM"
runat
=
"server"
Skin
=
"Default"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
IsSticky
=
"true"
Style
=
"position: absolute;"
>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
ForeColor
=
"Red"
>Loading... </
asp:Label
>
<
asp:Image
ID
=
"Image1"
runat
=
"server"
Width
=
"224px"
Height
=
"48px"
ImageUrl
=
"~/Loading.gif"
>
</
asp:Image
>
</
telerik:RadAjaxLoadingPanel
>
When declaring RadAjaxManagerProxy inherits its settings from RadAjaxManager but you could explicitly set loading panel for every AjaxUpdatedControl. Additionally, you could go through the help article below for more information on the topic.
Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.