Async partial updates with telerik ajax

8 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 31 Mar 2009 Link to this post

    Hi,

    I'm messing around with the MS live toolkit.
    One thing in this is the Contacts Control.

    I got it working like this:

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
        <live:Contacts ID="Contacts1" runat="server" DataDesired="firstname,email" Height="300px" Width="250px" PrivacyStatementURL="~/EIGPrivacy.aspx" OnServerData="Contacts1_OnServerData" /> 
        <br /> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
            <ContentTemplate> 
                <asp:Label ID="lblErg" runat="server"></asp:Label> 
            </ContentTemplate> 
            <Triggers> 
                <asp:AsyncPostBackTrigger ControlID="Contacts1" EventName="ServerData" /> 
            </Triggers> 
        </asp:UpdatePanel> 
    </asp:Content> 
     
    But when I try this with RadAjaxManager it does not work (the label does not update)
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="alpPan1">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Contacts1" EventName="ServerData">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="lblErg" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="alpPan1" runat="server" Height="75px" Width="75px" Transparency="5">  
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0;" /> 
        </telerik:RadAjaxLoadingPanel> 
        <live:Contacts ID="Contacts1" runat="server" DataDesired="firstname,email" Height="300px" Width="250px" PrivacyStatementURL="~/EIGPrivacy.aspx" OnServerData="Contacts1_OnServerData" /> 
        <br /> 
        <asp:Label ID="lblErg" runat="server"></asp:Label> 
    </asp:Content> 
     

    By the way - using the smarttag on RadAjaxManager to config the manager I don't get the contacts control listed.
    But that's not the thing - I'm just curios if the approach with asp:update... can be done with telerik Ajax also.

    Regards

    Manfred
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 03 Apr 2009 Link to this post

    Hello Manfred,

    You can easily observe same behavior as with RadAjax if you set UpdateMode="Conditional" of UpdatePanel from the first code snippet.

    RadAjax switches UpdatePanel's UpdateMode to Conditional and that is the reason for this behavior.

    Greetings,
    Nikolay
    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. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 03 Apr 2009 Link to this post

    Do I understand you right, when I guess that my sample would work (like it does with updatepanel) with AjaxManager if I set the UpdateMode to conditional?
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 06 Apr 2009 Link to this post

    Hello Manfred,

    For your conveniance I've prepared example demonstrating how you can use Contacts control with RadAjaxManager.
    Please find it attached to this post.

    Kind regards,
    Nikolay
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  6. Raviraj
    Raviraj avatar
    7 posts
    Member since:
    Apr 2009

    Posted 07 Apr 2009 Link to this post

    RadAjax switches UpdatePanel's UpdateMode to Conditional and that is the reason for this behavior. >>
    How can I made UpdatePanel's(RadAjaxPanel's) UpdateMode to Always.
  7. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 09 Apr 2009 Link to this post

    Raviraj,

    RadAjax use UpdatePanels with UpdateMode = "Conditional" and this is by design.
    Attached to my previous post you will find example how to change UpdateMode to "Always".

    Greetings,
    Nikolay
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  8. Raviraj
    Raviraj avatar
    7 posts
    Member since:
    Apr 2009

    Posted 09 Apr 2009 Link to this post

    Hello Sir,

    First of all, Thank you for your responce.

    I don't have Telerik.Web.UI controls installed. i.e registry <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    I have only radajaxcontrols installed. i.e I have the RadAjax.Net2 in my assembly and in web.config I have added this tag <add assembly="RadAjax.Net2, Version=1.7.0.0, Culture=neutral, PublicKeyToken=3F7B438D1C762D0B"/>

    In radA:RadAjaxManager I am unable to find the onajaxsettingcreated.
    I have posted the same question in another thread. The link is as below which contains the code snippest also.
    http://www.telerik.com/community/forums/aspnet/ajax/how-to-set-property-of-radajaxpanel-updatemode-always.aspx

    Waiting for your responce.

    Thank's,
    Raviraj
  9. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 13 Apr 2009 Link to this post

    Hello Raviraj,

    This forum thread is started under RadControls for ASP.NET AJAX section.
    I see that you are using RadControls for ASP.NET.

    RadControls for ASP.NET are not build on top of MS ASP.NET AJAX as RadControls for ASP.NET AJAX are. Thus you do not have event AjaxSettingsCreated nor UpdatePanel to change it's mode. 

    I hope this helps.

    Best wishes,
    Nikolay
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017