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

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

3 Answers 302 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
charles
Top achievements
Rank 1
charles asked on 02 Mar 2011, 12:39 PM
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>

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Mar 2011, 01:23 PM
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!
0
charles
Top achievements
Rank 1
answered on 14 Mar 2011, 08:20 AM
Thank you very much. Now the code is working fine.

i added the Radgrid inside the panel, Now the button click is not working.
0
Maria Ilieva
Telerik team
answered on 17 Mar 2011, 10:18 AM
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
Tags
Ajax
Asked by
charles
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
charles
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or