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

Loading Image not displayiing.

2 Answers 38 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
IT
Top achievements
Rank 1
IT asked on 07 Sep 2009, 11:51 AM
Hi all,

i've got a bit of a issue which i hope is a simple to fix.

I have a RadMenu and a asp:literal control

When i click a radmenu item it updates the literal control.

I've tried implementing Ajax and a loadingPanel, Everything works apart from the loading image.

The loading image is not displayed not matter what i do

here is a section of the code

Here is the Ajax part of the code
<telerik:RadAjaxLoadingPanel  
        ID="RadAjaxLoadingPanel1" Runat="server" EnableEmbeddedSkins="false"
        <img alt="Loading..." src="loading3.gif" /> 
        </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  
        DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        <AjaxSettings> 
        
            <telerik:AjaxSetting AjaxControlID="RadMenuTOC"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="LitTitle" LoadingPanelID="RadAjaxLoadingPanel1"/> 
                    <telerik:AjaxUpdatedControl ControlID="LitContent"  
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

Here is the definition of the controls which are being updated

<div class="divtoc"
<p>Table of Contents</p> 
    <p>&nbsp;</p> 
    <telerik:RadMenu ID="RadMenuTOC" Runat="server" Flow="Vertical" Skin="Black"  
        onitemclick="RadMenuTOC_ItemClick" > 
        <DefaultGroupSettings ExpandDirection="Right" /> 
         
    </telerik:RadMenu> 
</div><!--end of toc--> 
 
<div class="subcatmaincontent"
 
<h2><asp:Literal ID="LitTitle" runat="server" Text=""></asp:Literal></h2
 
<div class="test"
<asp:Literal ID="LitContent" runat="server" Text=""></asp:Literal> 
</div><!-- end test div--> 
</div><!--end of main content--> 

So clicking on a RadMenuTOC updates the LitContent and LitTitle but i never see a loading image




2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 07 Sep 2009, 12:27 PM
Hello Brian,

There are two problems here:

1) Literal controls do not render a wrapper HTML element. By default RadAjaxLoadingPanel takes the width and height of the updated control, and it needs the wrapper element to calculate those width and height attributes. You can replace the Literal control with a Label to avoid this problem.

2) Even if you replace the Literal control with a Label and the Label is initially empty, you will not see the loading panel the first time, because the width of an empty Label is zero. You can workaround this by setting an initial Text value of "&nbsp;" or using some CSS styles to make the label behave as a block-level element, e.g.:

<h2><asp:Label ID="LitTitle" runat="server" Text="" style="display:block;height:20px" /></h2>


Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
IT
Top achievements
Rank 1
answered on 07 Sep 2009, 02:03 PM
Thank you very much

worked perfectly, once again excellent support

keep up the good work!

Tags
Ajax
Asked by
IT
Top achievements
Rank 1
Answers by
Dimo
Telerik team
IT
Top achievements
Rank 1
Share this question
or