Question

I have a problem with RadAjaxLoadingPanel. I'm not able to use it the right way. There is a sample of my code here. LoadingPanel starts work after I'll change skin with SkinManager dropdown. Could anybody help me and tell me what I have to do to make it work without this trick?

My page:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TelerikWebApp1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>
<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="SkinManager1" runat="server" ShowChooser="true" />
    <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>
    <div>
        <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="275px" Style="padding-top: 15px; padding-left: 15px">
            <asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click"></asp:Button>
        </asp:Panel>
    </div>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
</form>
</body>
</html>

Code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace TelerikWebApp1
{
public partial class WebForm1 : System.Web.UI.Page
{
    public void Button1_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(2000);
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
}

Thanks for any help.

Was it helpful?

Solution

Read this: http://www.telerik.com/help/aspnet-ajax/ajax-loadingpanel.html. It will explain how and why a Skin for the RadAjaxLoadingPanel is needed, and it will also show you how to define your own template if you don't want to set a skin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top