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

RadAjaxLoadingPanel on c# function call

1 Answer 80 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Peter Viau
Top achievements
Rank 1
Peter Viau asked on 30 Oct 2013, 04:30 PM
How would I display a RadAjaxLoadingPanel on c# function call where I'm doing some table updates and close it on return?

Note:

The user clicks on Save or Delete button, a conformation Dialog opens and if confirmed a function is called in c# to make the necessary changes in the database.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 31 Oct 2013, 08:27 AM
Hi Peter Viau,

Please take a look into the following code snippet to show a loading panel explicitly on a button click over an asp:panel.

ASPX:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Panel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<asp:Panel ID="Panel1" runat="server" CssClass="panel">
    <asp:Button ID="Button1" runat="server" Text="Loading panel" OnClick="Button1_Click">
    </asp:Button>
</asp:Panel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Web20"
     BackgroundPosition="Center">
</telerik:RadAjaxLoadingPanel>

C#:
protected void Button1_Click(object sender, EventArgs e)
{
    System.Threading.Thread.Sleep(2000);
}

Thanks,
Shinu.
Tags
Ajax
Asked by
Peter Viau
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or