RadAjaxManager: MANY TO ONE Controls Issue

6 posts, 0 answers
  1. Ryan Lege
    Ryan Lege avatar
    42 posts
    Member since:
    Sep 2008

    Posted 02 Dec 2009 Link to this post

    I have MANY controls on a page that can UPDATE one control, but it will only do one!

    This is a sample code:

     

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />

     

     

     

     

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" >

     

     

     

        <AjaxSettings>

     

     

     

            <telerik:AjaxSetting AjaxControlID="btnBack">

     

     

     

                <UpdatedControls>

     

     

     

                    <telerik:AjaxUpdatedControl ControlID="tp"/>

     

     

     

                </UpdatedControls>

     

     

     

            </telerik:AjaxSetting>

     

     

     

        <telerik:AjaxSetting AjaxControlID="btnForward">

     

     

     

                <UpdatedControls>

     

     

     

                    <telerik:AjaxUpdatedControl ControlID="tp"/>

     

     

     

                </UpdatedControls>

     

     

     

        </telerik:AjaxSetting>

     

     

     

        </AjaxSettings>

     

     

     

     

    </telerik:RadAjaxManager>

    Why is it that only the top control works but the Manager ignores the other?

    Thanks

     

     

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2009 Link to this post

    Hello Benjamin,

    I tried a similar scenario at my end and could not replicate your issue. Can you make sure that you have placed the ScriptManager above the AjaxManager on the page.

    An alternative solution would be to place the controls in a RadAjaxPanel. You can also exclude controls from ajaxifying when using an AjaxPanel using any of the approaches mentioned here.

    Thanks
    Princy.

  3. Ryan Lege
    Ryan Lege avatar
    42 posts
    Member since:
    Sep 2008

    Posted 03 Dec 2009 Link to this post

    No the ScriptManager is at the top. This so frustrating because it should be simple!


    <

     

    telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

     

     

    </telerik:RadStyleSheetManager>

     

     

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

     

     

    </telerik:RadScriptManager>

     

     

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />

     

     

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

     

     

     

    <AjaxSettings>

     

     

    <telerik:AjaxSetting AjaxControlID="btnBack">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="tp"/>

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     

     

    <telerik:AjaxSetting AjaxControlID="btnForward">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="tp"/>

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     

     

    <telerik:AjaxSetting AjaxControlID="btnProcessFilter">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="tp" />

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     

     

    <telerik:AjaxSetting AjaxControlID="chkFullText">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="tp" />

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     

     

    </AjaxSettings>

     

     

    </telerik:RadAjaxManager>

     

  4. Johny
    Johny avatar
    80 posts
    Member since:
    Aug 2008

    Posted 03 Dec 2009 Link to this post

    Hi Benjamin,

    Your code looks fine for me. Can you provide what the "tp" control actually is. Or maybe you can provide working code that can be tested. Do you reproduce the issue using asp:UpdatePanel instead of ajaxManager?

    Thanks,
    Johny
  5. Ryan Lege
    Ryan Lege avatar
    42 posts
    Member since:
    Sep 2008

    Posted 04 Dec 2009 Link to this post

        Here is the entire page. Basically tp is a RadAjaxPanel that I use to hold a LITERAL control added at run time. The LITERAL contains a dynamically created HTML calendar created from a table that changes depending on what other control the end-user clicked. That there is my issue. Only the very top in the list of controls in the RadAjaxManager fires, the rest get ignored. Feel free to constructively criticize my code if you like.

     

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SyncCalendar.aspx.cs" Inherits="SyncCalendar.SyncCalendar"
        EnableSessionState="false" %>

    <%@ Register Assembly="Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
        Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>"Classified"</title>
        <link rel="stylesheet" type="text/css" href="CSS-JS/SyncCalendarStyle.css" />
        <script type="text/javascript" src="CSS-JS/wz_jsgraphics.js"></script>
    </head>
    <body>

        <form id="form1" runat="server">

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
            EnableTheming="True">
        </telerik:RadScriptManager>

        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>

       

       
      
        <table>
            <tr>
                <td>
                    <fieldset>
                        <legend>Actions</legend>
                       
                        <table>
                            <tr>
                                <td>
                               
                                    <asp:Button ID="btnBack" runat="server" Text="BACK" OnClick="btnBack_Click1" Width="107px" />
                                   
                                </td>
                                <td>
                               
                                    <asp:Button ID="btnForward" runat="server" Text="FORWARD" OnClick="btnForward_Click"
                                        Width="107px" />
                                      
                                </td>
                                <td>
                                    <asp:LinkButton ID="NewEventLink" runat="server" ToolTip="Add a new Event to the Sync Calendar"
                                        OnClick="NewEventLink_Click">Add Event</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lnkDash" runat="server" OnClick="lnkDash_Click">Dashboard</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lnkReports" runat="server" OnClick="lnkReports_Click">Reports</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="btnReturn" runat="server" OnClick="btnReturn_Click">Portal</asp:LinkButton>
                                </td>
                            </tr>
                        </table>           
                       
              
                    </fieldset>
                </td>

                <td>
                    <fieldset>
                        <legend>Filter</legend>
                        <table>
                            <tr>
                                <td>
                                    <telerik:RadDatePicker ID="DatePicker" runat="server" Skin="Forest">
                                        <Calendar ID="Calendar1" runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                                            ViewSelectorText="x" Skin="Forest">
                                        </Calendar>
                                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    </telerik:RadDatePicker>
                                </td>
                                <td>
                                    <asp:CheckBoxList ID="CBList" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                        <asp:ListItem Value="ORG" Selected="True">"Classified"</asp:ListItem>
                                    </asp:CheckBoxList>
                                </td>
                                <td>
                                    <telerik:RadComboBox ID="DDCalendarLists" runat="server" Width="200px" MarkFirstMatch="true"
                                        DataSourceID="ObjectDataSource1" EnableLoadOnDemand="true" HighlightTemplatedItems="true"
                                        OnDataBound="DDCalendarLists_DataBound" DataTextField="Title" DataValueField="URL">
                                        <CollapseAnimation Duration="200" Type="OutQuint" />
                                        <HeaderTemplate>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <div style="width: 100px">
                                                            Calendar
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            Org
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <div style="width: 100px">
                                                            <%#DataBinder.Eval(Container.DataItem, "Title")%>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <%#DataBinder.Eval(Container.DataItem, "Org")%>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:RadComboBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnProcessFilter" runat="server" Text="Go" OnClick="btnProcessFilter_Click" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </table>

     

        <telerik:RadAjaxPanel ID="tp" runat="server" EnableAJAX="true">
        </telerik:RadAjaxPanel>

       
            <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="LeaveToolTip"
            Width="250" Height="350" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
            Position="MiddleLeft" Animation="FlyIn"></telerik:RadToolTipManager>
       
        <asp:ObjectDataSource ID="ObjectDataSource1" TypeName="KMOBusinessLayer.CollectionObjects.SPListCollection"
            SelectMethod="GetListsFromSite" runat="server" />

        <input id="Today" type="hidden" runat="server" />

                <asp:CheckBox ID="chkFullText" runat="server" AutoPostBack="True" OnCheckedChanged="chkFullText_CheckedChanged"
            Text="View in Full Text" />

        <input id="Weekends" type="hidden" runat="server" />
        <input id="TodayIncluded" type="hidden" runat="server" />
      
        </form>

        <script type="text/javascript">

           
           
            if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
                var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number
                if (ieversion <= 6)
                {
                    document.getElementById("tp").style.display = "none";
                    alert("You're using IE6.x or below and MUST HAVE AT LEAST IE7 for the Sync Calendar to function properly. You will now be redirected back to the Portal home page.");
                    window.location.href = "https://portal.setaf.army.mil";

                }

            }

        
          

           

        </script>

    </body>
    </html>

     

  6. O'Man
    O'Man avatar
    34 posts
    Member since:
    Oct 2009

    Posted 04 Dec 2009 Link to this post

    Hi Benjamin,

    Why on earth do you update radajaxpanel through radajaxmanager? What is the point to update a control that automatically updates the controls inside itself?

    Let me suggest you to review the following link:

    http://www.telerik.com/help/aspnet-ajax/ajxcontrolsinajaxpanelandajaxsettings.html

    I hope this helps
    Oman
Back to Top