Displaying the loading panel on the button click does not support the property

4 posts, 0 answers
  1. charles
    charles avatar
    6 posts
    Member since:
    May 2009

    Posted 02 Mar 2011 Link to this post

    Displaying the loading panel on the button click shows error that was
    "Object doesn't support this property or method".

    Error displayed in the following line - currentLoadingPanel.show(currentUpdatedControl);

    My code was,

      <asp:Button ID="Button1" runat="server" Text="Test"
                           OnClick="btnCreate_Click" />
      <asp:Panel ID="pnlDetails" runat="server">
    test1
      </asp:Panel>

    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
            <AjaxSettings>
                                     <telerik:AjaxSetting AjaxControlID="Button1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlDetails" LoadingPanelID="LoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
        </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Transparency="30" BackColor="#E0E0E0">
            <asp:Image runat="server" AlternateText="status" ImageUrl="~//Skins/Windows/Loading.gif"
                ID="img" />
        </telerik:RadAjaxLoadingPanel>
    <telerik:RadCodeBlock ID="RadCode" runat="server">

      <script type="text/javascript">
              
                var currentLoadingPanel = null;
                var currentUpdatedControl = null;
                function RequestStart(sender, args) {
                    debugger;
                    currentLoadingPanel = document.getElementById('<%= LoadingPanel.ClientID%>');
                    var aliastest = args.get_eventTarget();
                    if (aliastest == 'ctl00$contentPlaceHolder$Button1') {
                         currentUpdatedControl = document.getElementById('<%=pnlDetails.ClientID%>');
                    }
                    currentLoadingPanel.show(currentUpdatedControl);
                }
                function ResponseEnd() {
                          //hide the loading panel and clean up the global variables
                    if (currentLoadingPanel != null)
                        currentLoadingPanel.hide(currentUpdatedControl);
                    currentUpdatedControl = null;
                    currentLoadingPanel = null;
                }
              

            </script>
          
        </telerik:RadCodeBlock>

  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 07 Mar 2011 Link to this post

    Hello Charles,

    I took the sample code you provided and put it in a sample page following a similar scenario you have.
    I am attaching the page for your reference. Please examine it and let  me know if it helps to resolve the problem you are facing.

    I hope this helps.

    Regards,
    Pavlina
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. charles
    charles avatar
    6 posts
    Member since:
    May 2009

    Posted 14 Mar 2011 Link to this post

    Thank you very much. Now the code is working fine.

    i added the Radgrid inside the panel, Now the button click is not working.
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 17 Mar 2011 Link to this post

    Hi Charles,

    Please find attached a modified version of the provided example in which the ButtonClick is working properly when RadGrid is placed inside the Panel. Test it on your side and let me know what the difference in your case is.


    Best wishes,
    Maria Ilieva
    the Telerik team
Back to Top