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

How to set: RadAjaxPanel Update mode to always

7 Answers 376 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amol
Top achievements
Rank 2
Amol asked on 02 Apr 2009, 02:53 PM
Hello,

Is it possible in AjaxPanel same functionality as Update Panel having update mode=always

<telerik:RadAjaxPanel id="RadAjaxPanel1" runat="server" 
       EnableAJAX"True"
    </telerik:RadAjaxPanel> 


Thanks,
Amol

7 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 06 Apr 2009, 04:59 PM
Hello Amol,

To achieve your goal you need to wire the OnAjaxSettingCreating event and set the UpdateMode property of the update panel which is about to be generated. Here is a code snippet which illustrates the approach:
    protected void RadAjaxPanel1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e) 
    { 
        e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always; 
    } 

Regards,
Georgi Krustev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Saed
Top achievements
Rank 1
answered on 13 May 2009, 03:31 AM
What about UpdateMode="Conditional" & ChildrenAsTriggers="False"? Do they follow same concept?

Regards,
0
Georgi Krustev
Telerik team
answered on 14 May 2009, 02:24 PM
Hello Saed,

When the UpdateMode is set to "Always" the content of the update panel will update when some of the controls in it makes a postback (or if there is a registered control which will make an asynchronous call).

The ChildrenAsTriggers property determines whether postbacks from a child control in an UpdatePanel result in its contents being refreshed. A scenario where you might set ChildrenAsTriggers to false is when you have two UpdatePanel controls and you want a postback from the first panel to update the content of the second panel but not update its own content. For example, the first panel might be a list of products to buy and the second panel might be a shopping cart.

Please examine these online sources for details:
http://www.asp.net/AJAX/Documentation/Live/mref/P_System_Web_UI_UpdatePanel_ChildrenAsTriggers.aspx
http://www.asp.net/AJAX/Documentation/Live/mref/P_System_Web_UI_UpdatePanel_UpdateMode.aspx

Best regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Saed
Top achievements
Rank 1
answered on 14 May 2009, 04:56 PM
With respect my friend, that wasn't my question. I'm very well aware of ASP UpdatePanel and how it works.

My question was in reference to RadAjaxPanel. In the initial post, you kindly showed how to set AjaxPanel UpdateMode to always. Based on that, does AjaxPanel have other UpdateModes such as Conditional (as the case with ASP UpdatePanel)? In the same context, does it have something similar to  ChildrenAsTriggers?

The reason I'm asking is I couldn't find any related property(ies) to control UpdateMode when replaced ASP UpdatePanel with RadAjaxPanel.

Hope this clarifies.

Regards,
0
Georgi Krustev
Telerik team
answered on 15 May 2009, 07:14 AM
Hello Saed,

Please excuse me for the misunderstanding your question.

In general the RadAjaxPanel is a wrapper of the UpdatePanel. Thus if you reference the e.UpdatePanel, you actually retrieve the UpdatePanel wrapped in the RadAjaxPanel. Hence you can set all available to one UpdatePanel properties. Here is a code snippet showing what I mean:
    protected void RadAjaxPanel1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e) 
    { 
        UpdatePanel updatePanel = e.UpdatePanel; //getting reference to the UpdatePanel 
        updatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional; //this is te default value for the RadAjaxPanel 
        updatePanel.ChildrenAsTriggers = false
    } 

Kind regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rohan
Top achievements
Rank 1
answered on 11 Dec 2012, 01:02 PM
Hi all,

I want to update control in radajaxpanle on event delegate of my control .... just like update panel does like updatepanle.update().

...... please provide any link or document i stuck here .........................
0
Maria Ilieva
Telerik team
answered on 14 Dec 2012, 09:28 AM
Hello Rohan,

The RadAjaxPanel does not have Update method as the asp UpdatePanel control. However you could manually call ajaxRequest() on the client for this RadAjaxPanel and in the server OnAjaxRequest event update the needed control.

Regards,
Maria Ilieva
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.
Tags
General Discussions
Asked by
Amol
Top achievements
Rank 2
Answers by
Georgi Krustev
Telerik team
Saed
Top achievements
Rank 1
Rohan
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or