How to set: RadAjaxPanel Update mode to always

8 posts, 0 answers
  1. Amol
    Amol avatar
    57 posts
    Member since:
    Apr 2008

    Posted 02 Apr 2009 Link to this post

    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
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 06 Apr 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Saed
    Saed avatar
    30 posts
    Member since:
    Apr 2009

    Posted 12 May 2009 Link to this post

    What about UpdateMode="Conditional" & ChildrenAsTriggers="False"? Do they follow same concept?

    Regards,
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 14 May 2009 Link to this post

    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.
  6. Saed
    Saed avatar
    30 posts
    Member since:
    Apr 2009

    Posted 14 May 2009 Link to this post

    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,
  7. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 15 May 2009 Link to this post

    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.
  8. Rohan
    Rohan avatar
    94 posts
    Member since:
    Jul 2012

    Posted 11 Dec 2012 Link to this post

    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 .........................
  9. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 14 Dec 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017