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

Loading Panel doesn't appear

4 Answers 109 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jhon s
Top achievements
Rank 1
Jhon s asked on 04 May 2009, 08:16 AM
Hello,

I have been using RadAJAXLoadingPanel in many of my web pages but I have
encountered a strange behavior in one of my web pages.
I have a page with  :
1. A Grid
2. Couple of text boxes
3. Three buttons
4. asp Image
5. Loading Panel.
When I click on each of the three buttons, an AJAX request is posted while the LoadingPanel appears on the 'asp Image' and the other buttons turn to be disabled through a javascript code. After the request has returned from the server the appropriate image is displayed i.e success or fail.
For some reason when I click on the first two buttons for the first time ( either the first button or the second button) the LoadingPanel doesn't appear. Only from the second click on the first two buttons the Loading Panel appears. Clicking on the third button doesn't causes the LoadingPanel to appear at all.

Here is the section of the RadAJAXManager:

<telerik:RadAjaxManager ID="AJAXManager" runat="server" EnableAJAX="true"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnSaveNow"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="StatusImage" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblStatustxt"/> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSaveNow" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSaveLater" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnRefreshCommand" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnSaveLater"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="StatusImage" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblStatustxt"/> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSaveNow" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSaveLater" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnRefreshCommand" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnRefreshCommand"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="StatusImage" LoadingPanelID="RadAjaxLoadingPanel1"/> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblStatustxt"/> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSaveNow" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnSaveLater" /> 
                </UpdatedControls> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="btnRefreshCommand" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
Is there something wrong with my definition? Has anybody encountered this problem?

4 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 04 May 2009, 12:41 PM
Hello Ilan,

Would it be possible to post the full code of your page and code-behind on here? 

The only thing I notice is that I normally have a setup like...

<telerik:RadAjaxManager>
    <AjaxSettings>
        <telerik:AjaxSetting... />
        <telerik:AjaxSetting... />
        <telerik:AjaxSetting... />
    </AjaxSettings>
</telerik:RadAjaxManager>

But I don't think that how you're defining things should be a show-stopper.  Seeing more of the code on your page would definitely help to diagnose this a bit better.
0
Jhon s
Top achievements
Rank 1
answered on 05 May 2009, 06:20 AM
This is the Java Script that is performed before the round trip to the server
function SendCommand(ButtonToSend) { 
            var btnSaveNow = document.getElementById("btnSaveNow"); 
            var btnSaveLater = document.getElementById("btnSaveLater"); 
            var btnRefresh = document.getElementById("btnRefreshCommand"); 
            var lblStatustxt = document.getElementById("lblStatustxtPanel"); 
            lblStatustxt.style.display = "none"
            btnSaveNow.disabled = true
            btnSaveLater.disabled = true
            btnRefresh.disabled = true
            __doPostBack(ButtonToSend, ''); 
        }
This is the image that the loading panel replaces when the click is performed.
<td style="position: relative; left: 2px"
                    <asp:Image ID="StatusImage" Visible="true" runat="server" ImageUrl='<%#GetStatusImage()%>' /> 
                    &nbsp;&nbsp;&nbsp;<asp:Label ID="lblStatustxt" runat="server" Visible="true" Font-Bold="true" 
                        Text='<%#GetStatusMessage()%>'</asp:Label> 
            </td> 
This is the Loading Panel
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        IsSticky="false" Width="75px" Enabled="true"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.LoadingProgressBar.gif") %>' 
            style="border: 0px;" /></telerik:RadAjaxLoadingPanel> 
This is one of the buttons event handlers on the server - its content varies from one button event handler to the other but the part that influence the UI as shown below doesn't change
 Protected Sub btnRefreshCommand_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles btnRefreshCommand.Click 
 
       ' Some code that doesn't influence the UI  
        btnSaveNow.Enabled = True 
        btnSaveLater.Enabled = True 
        btnRefreshCommand.Enabled = True 
        Page.DataBind() 
    End Sub 



0
Sebastian
Telerik team
answered on 07 May 2009, 11:59 AM
Hi Ilan,

Unfortunately the information provided so far is not enough to pinpoint the exact cause of the strange behavior you encountered. To research the matter further, I suggest you prepare a working subset of your project and send it enclosed to a regular support ticket. We will test it locally and will do our best to provide an accurate explanation/quick resolution.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jhon s
Top achievements
Rank 1
answered on 11 May 2009, 08:17 AM
Thanks you for your replay, I will see if I can solve it.



Tags
Ajax
Asked by
Jhon s
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
Jhon s
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or