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

Async partial updates with telerik ajax

7 Answers 198 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 31 Mar 2009, 04:56 PM
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

7 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 03 Apr 2009, 01:43 PM

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.
0
ManniAT
Top achievements
Rank 2
answered on 03 Apr 2009, 02:08 PM
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?
0
Nikolay Rusev
Telerik team
answered on 06 Apr 2009, 03:23 PM
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.
0
Raviraj
Top achievements
Rank 2
answered on 07 Apr 2009, 04:27 PM
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.
0
Nikolay Rusev
Telerik team
answered on 09 Apr 2009, 01:31 PM
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.
0
Raviraj
Top achievements
Rank 2
answered on 09 Apr 2009, 01:49 PM
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
0
Nikolay Rusev
Telerik team
answered on 13 Apr 2009, 02:06 PM
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.
Tags
Ajax
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Nikolay Rusev
Telerik team
ManniAT
Top achievements
Rank 2
Raviraj
Top achievements
Rank 2
Share this question
or