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

RadManger in initial page load

3 Answers 72 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Waleed Seada
Top achievements
Rank 2
Waleed Seada asked on 01 Jun 2008, 07:43 AM
Hello all,

How can I show a loading panel while the page is loading, I have found an example in the help, but doesn't work for me.

I have a masterpage with RadSplitter on it and I did the following:

RadManager settings in .aspx:
<telerik:RadAjaxManager ID="RadMgr" runat="server" OnAjaxRequest="RadMgr_AjaxRequest">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadMgr">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Panelcontrolholder" LoadingPanelID="LoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 

JS:
script type="text/javascript">  
// Show Loading Panel in the first application initialization phase  
window.onload = function()  
{  
    setTimeout( function()  
    {  
        window"<%= RadMgr.ClientID %>"].AjaxRequest("InitialPageLoad");  
    }, 200);  

CS:
protected void RadMgr_AjaxRequest(object sender,AjaxRequestEventArgs e)  
    {  
        if (e.Argument == "InitialPageLoad")  
        {  
            //simulate longer page load  
            //System.Threading.Thread.Sleep(2000);  
            MainPanel.Visible = true;  
        }  
    } 

What is missing here !!

Best regards,
Waleed

3 Answers, 1 is accepted

Sort by
0
Waleed Seada
Top achievements
Rank 2
answered on 01 Jun 2008, 08:25 AM
Hello Guys,

I change this JS as following:

<telerik:RadCodeBlock ID="cb1" runat="server">  
    <script type="text/javascript">  
        // Show Loading Panel in the first application initialization phase  
        window.onload = function()  
        {  
            setTimeout( function()  
            {  
                $find("<%=RadMgr.ClientID%>").ajaxRequest("InitialPageLoad");  
                //window[ "<%= RadMgr.ClientID %>"].AjaxRequest("InitialPageLoad");  
            }, 200);  
        }  
    </script>  
</telerik:RadCodeBlock> 

It works, but when the page is already there, I wanted to start as soon as the page start loading ....

Any suggestions
Waleed
0
newbie
Top achievements
Rank 1
answered on 11 Jun 2008, 05:15 PM
Did you find a solution to that?
I am having a similar problem
0
Waleed Seada
Top achievements
Rank 2
answered on 12 Jun 2008, 05:04 AM
Not Yet ...

Regards,
Waleed
Tags
Ajax
Asked by
Waleed Seada
Top achievements
Rank 2
Answers by
Waleed Seada
Top achievements
Rank 2
newbie
Top achievements
Rank 1
Share this question
or