The stripped down version of our scenario is this:
We have two buttons behind one ajax panel. When clicked, the first button needs to show one loading panel, and then second button needs to show a different loading panel when it is clicked. We cannot place these items into separate ajax panels, they need to stay within the same panel (one button updates some properties on the other button). Is there any way to change which loading panel gets triggered based on which button was clicked?
We have two buttons behind one ajax panel. When clicked, the first button needs to show one loading panel, and then second button needs to show a different loading panel when it is clicked. We cannot place these items into separate ajax panels, they need to stay within the same panel (one button updates some properties on the other button). Is there any way to change which loading panel gets triggered based on which button was clicked?
5 Answers, 1 is accepted
0

robertw102
Top achievements
Rank 1
answered on 16 Feb 2010, 02:59 PM
The only way to do this is to use the RadAjaxManager control. It allows you to set different loading panels for different buttons.
0

tjans
Top achievements
Rank 1
answered on 16 Feb 2010, 04:19 PM
Thanks for the speedy reply...
I've actually never used that before, could you provide a small example, or point me to an existing demo if one in fact does exist? If there are a bunch of other controls on the page that need ajaxing as well, would I need to specify each of them manually as well?
I've actually never used that before, could you provide a small example, or point me to an existing demo if one in fact does exist? If there are a bunch of other controls on the page that need ajaxing as well, would I need to specify each of them manually as well?
0
Hello Travis,
Please refer to the RadAjaxManager documentation:
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
Here is a simple demo:
Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please refer to the RadAjaxManager documentation:
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
Here is a simple demo:
<%@ Page Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
meta
http-equiv
=
"content-type"
content
=
"text/html;charset=utf-8"
/>
<
title
>RadControls</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Transparency
=
"50"
BackColor
=
"Yellow"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel2"
runat
=
"server"
Transparency
=
"50"
BackColor
=
"Green"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
LoadingPanelID
=
"RadAjaxLoadingPanel2"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"AJAX 1"
/>
<
asp:Button
ID
=
"Button2"
runat
=
"server"
Text
=
"AJAX 2"
/>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
>
Panel 1
</
asp:Panel
>
</
form
>
</
body
>
</
html
>
Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0

Matt
Top achievements
Rank 1
answered on 28 Aug 2019, 06:44 PM
This won't work if the controls are a child of another, like a RadGrid. It should, but it doesn't.
0
Hi Matt,
You can enable AJAX for any child control manually following this approach: Add AjaxSettings Programmatically.
Also, I would like to Note that child controls should not be added to the AJAX settings if their parents are already Ajaxified. This will Nest the UpdatePanels and will produce unexpected behavior.
For example, if you have several buttons in a grid template you would like to enable AJAX for, you can do that using the approach presented in the article I've shared above, however, you must ensure that the Grid itself is not Ajaxified.
Kind regards,
Attila Antal
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.