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

[Solved] Problems with RadAjaxLoadingPanel

3 Answers 119 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Nejc Žerjal
Top achievements
Rank 1
Nejc Žerjal asked on 04 Nov 2009, 11:52 PM
Hi

I'm a begginer and i'm having some problems with RadAjaxLoadingPanel.

<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"
 
            <script type="text/javascript"
                function ConditionalPostback(sender, args) { 
                    if (args.get_eventTarget() == "<%= Button1.UniqueID %>") { 
                        args.set_enableAjax(false); 
                    } 
                } 
            </script> 
 
        </telerik:RadScriptBlock> 
         
        <div class="divRatings"
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" /> 
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px" ClientEvents-OnRequestStart="ConditionalPostback" LoadingPanelID="RadAjaxLoadingPanel1"
                <div style="padding: 15px; padding-left: 60px; float: left;"
                    The Godfather (1972)<telerik:RadRating ID="RadRating1" runat="server" ItemCount="5" 
                        Value="3" SelectionMode="Continuous" Precision="Half" Orientation="Horizontal" /> 
                </div> 
                <br /> 
                <div> 
                    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> 
                </div> 
            </telerik:RadAjaxPanel> 
        </div> 
    </div> 
    </form> 
</body> 

protected void Button1_Click(object sender, EventArgs e) 
    { 
        System.Threading.Thread.Sleep(1000); 
    } 

If i click on the Button the postback occurs, but LoadingPanel does not apper.
What am I missing?

Thank you for your help.

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Nov 2009, 08:01 AM
Hi,

It seems you are disabling ajax on button click, which stops the loading panel from appearing. The AjaxLoadingPanel is integrated with Ajax settings and will show only if ajax is enabled.

Thanks
Princy.
0
Nejc Žerjal
Top achievements
Rank 1
answered on 05 Nov 2009, 10:18 AM
Hi

Is there any other way I can create a postback with Button without disabling ajax?

Thanks,
Nejc
0
Nejc Žerjal
Top achievements
Rank 1
answered on 05 Nov 2009, 01:48 PM
I solved the problem by using AJAX Manager insted of AJAX Panel.
Tags
Ajax
Asked by
Nejc Žerjal
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Nejc Žerjal
Top achievements
Rank 1
Share this question
or