Loading Panel with RadAjaxManagerProxy does not being displayed.

3 posts, 1 answers
  1. Tarang
    Tarang avatar
    11 posts
    Member since:
    Jun 2013

    Posted 01 Aug 2013 Link to this post

    Telerik Dll: 2013.2.717.40 (July 17 2013 release)

    When AjaxmangerProxy is used in Content pages, and have LoadinPanelID set for AjaxUpdatedControl, Loading Panel is not being displayed.

    Below is sample code for Content Page:

    <telerik:RadAjaxManagerProxy ID="mgrPxy" runat="server">
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="btnUpdateTime">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="txtLastupdatedDateTime" LoadingPanelID="appLoadingPanel" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>
       </telerik:RadAjaxManagerProxy>
       <asp:Panel ID="Panel2" runat="server" Width="500px">
           Last Updated DateTime :
           <asp:TextBox ID="txtLastupdatedDateTime" runat="server" Width="200px"></asp:TextBox>
           <br />
           <asp:Button ID="btnUpdateTime" runat="server" Text="Update Time" />
       </asp:Panel>

    Code Behind Of Content Page:

    Private Sub btnUpdateTime_Click(sender As Object, e As System.EventArgs) Handles btnUpdateTime.Click
           txtLastupdatedDateTime.Text = "Updated On:" + DateTime.Now.ToString()
       End Sub

    If i Change From RadAjaxmanagerProxy to RadAjaxManager then loading panel is being displayed. I am attaching code for Master page as well.

    SiteMaster.master Page:

    <telerik:RadScriptBlock ID="rtsb" runat="server">
                <script type="text/javascript">
                    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function (sender, e) {
     
                        $get("<%= appLoadingPanel.ClientID %>").style.height = document.documentElement.clientHeight + "px";
     
                        if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
                            $get("<%= appLoadingPanel.ClientID %>").style.height = document.documentElement.scrollHeight + "px";
                        }
                    });
                </script>
            </telerik:RadScriptBlock>
            <asp:ContentPlaceHolder ID="ScriptPlaceHolder" runat="server">
            </asp:ContentPlaceHolder>
            <div>
                <label>
                    Consume Time: (In Seconds)
                </label>
                <telerik:RadNumericTextBox ID="txtConsumeTime" runat="server" Type="Number" NumberFormat-DecimalDigits="0"
                    NumberFormat-AllowRounding="true" />
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <telerik:RadAjaxLoadingPanel ID="appLoadingPanel" runat="server" ZIndex="100000"
                ClientIDMode="Static" BackgroundPosition="Center" CssClass="LoadingPanel" IsSticky="true">
            </telerik:RadAjaxLoadingPanel>
            

    Code Behind for SiteMaster:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If (Not IsPostBack) Then
                txtConsumeTime.Text = "1"
            End If
     
            ConsumeTime()
        End Sub
     
        Private Sub ConsumeTime()
            Dim ticker As DateTime = DateTime.Now()
     
            While DateDiff(DateInterval.Second, ticker, DateTime.Now) <= CInt(txtConsumeTime.Text.Trim)
     
            End While
        End Sub
  2. Answer
    Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 05 Aug 2013 Link to this post

    Hello,

    We have to use RadAjaxManager to ajaxify any control in page/usercontrol/master page.

    But if we have already RadAjaxManager in the master page then and only then we can use RadAjaxManagerProxy in content page.

    Note : Please add RadAjaxMaanger in your master page.
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
        <div>
            <label>
                Consume Time: (In Seconds)
            </label>
            <telerik:RadNumericTextBox ID="txtConsumeTime" runat="server" Type="Number" NumberFormat-DecimalDigits="0"
                NumberFormat-AllowRounding="true" />
            <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
            </asp:ContentPlaceHolder>
        </div>
        <telerik:RadAjaxLoadingPanel ID="appLoadingPanel" runat="server" ZIndex="100000"
            ClientIDMode="Static" BackgroundPosition="Center" CssClass="LoadingPanel" IsSticky="true">
        </telerik:RadAjaxLoadingPanel>
    </div>
    </form>


    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tarang
    Tarang avatar
    11 posts
    Member since:
    Jun 2013

    Posted 05 Aug 2013 Link to this post

    Thanks for pointing it out. I had that before but still was not working. But then i realized that i 've to put RadManager after RadScrpitManager. Which is working fine. Sitemaster should be updated like below: Controls should be added in below order.

    1. ScriptManager
    2. AjaxManager
    3. ScriptBlock
    4. One or more ConentPlaceholders

    <telerik:RadScriptManager ID="rsm" runat="server">
                <CompositeScript>
                    <Scripts>
                        <asp:ScriptReference Path="~/Content/Scripts/Common.js" />
                    </Scripts>
                </CompositeScript>
            </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="ram" runat="server">
            </telerik:RadAjaxManager>
            <telerik:RadScriptBlock ID="rtsb" runat="server">
                <script type="text/javascript">
                    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function (sender, e) {
     
                        $get("<%= appLoadingPanel.ClientID %>").style.height = document.documentElement.clientHeight + "px";
     
                        if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
                            $get("<%= appLoadingPanel.ClientID %>").style.height = document.documentElement.scrollHeight + "px";
                        }
                    });
                </script>
            </telerik:RadScriptBlock>
            <asp:ContentPlaceHolder ID="ScriptPlaceHolder" runat="server">
            </asp:ContentPlaceHolder>
            <div>
                <label>
                    Consume Time: (In Seconds)
                </label>
                <telerik:RadNumericTextBox ID="txtConsumeTime" runat="server" Type="Number" NumberFormat-DecimalDigits="0"
                    NumberFormat-AllowRounding="true" />
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <telerik:RadAjaxLoadingPanel ID="appLoadingPanel" runat="server" ZIndex="100000"
                ClientIDMode="Static" BackgroundPosition="Center" CssClass="LoadingPanel" IsSticky="true">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAjaxLoadingPanel ID="winLoadingPanel" runat="server" ZIndex="1000000"
                ClientIDMode="Static" BackgroundPosition="Center" CssClass="winLoadingPanel"
                IsSticky="false">
            </telerik:RadAjaxLoadingPanel>
        </div>
Back to Top