in multi RadAjaxLoadingPanel, image hidden on async postback

6 posts, 0 answers
  1. Francesco
    Francesco avatar
    16 posts
    Member since:
    Mar 2011

    Posted 07 Mar 2011 Link to this post

    Hi, I have a problem with the control RadAjaxLoadingPanel. My version of Telerik controls is 2009.3.1314.35.

    When I expand all the panels by server call,  the loader is showed correctly on each panel, but when one of the panels ends the loader panel stop loader image and then, when the async post back was end, show the correct result.  Where am I wrong?

    Can I use only 1 PanelLoad for each Panel? In this exemple I have use 3 different Load, but the result is the same if I use 1 loader for all panel, is it wrong? Is it correct to use 1 panel Load for all Panel or must I use different loader panel?

     

    If I use the DefaultLoadingPanelID of RadAjaxManager and clear the LoadingPanelID of RadAjaxPanel control the loader are not show, is wrong this operation?

    I have also this problems

    -          I want to custom the style of panel header, what should I do? Does a specific css property exists for this? The css property of panelbar is for body not header.

    -          The distance of panel was set in panelBoxOut css class, in the attached sample is 90px. The loader are draw under the panel header corectly. If I set the property to 10 px the loader are draw in header panel. I want that the space from 2 panel are 10px but the loader are draw under loader and the distance is in css property class (90px), is it possible?

    -          I would like to call expand funtion by server side, but collapse the panel invoking a client function, I don’t want the postback for collapse, is it possible?

     

    Here enclosed you will find a solution that summarize all the issue written in this post.

    Thanks in advance for your prompt reply.

    Best Regards.



    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
        <style type="text/css">
            .panelBoxOut
            {
                min-height: 90px;
            }
            .panelBoxIn
            {
                min-height: 35px;
            }
        </style>
    </head>
    <body>
      
        <script type="text/javascript">
            function OnExpand(sender, eventArgs) {
                //logEvent("On expand: " + eventArgs.get_item().get_text());
            }
      
            function OnCollapse(sender, eventArgs) {
                //logEvent("On collapse: " + eventArgs.get_item().get_text());
                //how to Stop postback???
                return false;
            }
        </script>
      
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" RequestQueueSize="10">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanelFatture">
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanelContratti">
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel3" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>
        <div>
            <div>
                <telerik:RadAjaxPanel ID="RadAjaxPanel1Contratti" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                    <telerik:RadPanelBar runat="server" ID="RadPanelBarContratti" AllowCollapseAllItems="True"
                        Width="100%" CssClass="panelBoxOut" OnClientItemExpand="OnExpand" OnClientItemCollapse="OnCollapse"
                        OnItemClick="RadPanelBarContratti_ItemClick">
                        <Items>
                            <telerik:RadPanelItem Text="1) Contratti" Value="pnlDataAnagafica">
                                <Items>
                                    <telerik:RadPanelItem Value="Grid">
                                        <ItemTemplate>
                                            <div class="panelBoxIn">
                                                <%--<telerik:RadGrid ID="grdContratti" runat="server" DataSourceID="ObjectDataSourceContratti"
                                                    GridLines="None" Visible="False" AutoGenerateColumns="False">
                                                    <MasterTableView>
                                                    </MasterTableView>
                                                </telerik:RadGrid>--%>
                                                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </div>
            <div>
                <telerik:RadAjaxPanel ID="RadAjaxPanelFatture" runat="server" LoadingPanelID="RadAjaxLoadingPanel2">
                    <telerik:RadPanelBar runat="server" ID="RadPanelBarFatture" CssClass="panelBoxOut"
                        AllowCollapseAllItems="false" Width="100%" OnClientItemExpand="OnExpand" OnClientItemCollapse="OnCollapse"
                        OnItemClick="RadPanelBarFatture_ItemClick">
                        <Items>
                            <telerik:RadPanelItem Text="2) Fatture" Value="pnlDataAnagafica">
                                <Items>
                                    <telerik:RadPanelItem Value="Grid">
                                        <ItemTemplate>
                                            <div class="panelBoxIn">
                                                <%-- <telerik:RadGrid ID="grdFatture" runat="server" DataSourceID="ObjectDataSourceFatture"
                                                    GridLines="None" Visible="False" AutoGenerateColumns="False" OnGridCreated="OnGridCreated"
                                                    AllowPaging="True" PageSize="15">
                                                    <MasterTableView>
                                                    </MasterTableView>
                                                </telerik:RadGrid>--%>
                                                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </div>
            <div>
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel3">
                    <telerik:RadPanelBar runat="server" ID="RadPanelBarBarAnagrafe" CssClass="panelBoxOut"
                        AllowCollapseAllItems="false" Width="100%" OnClientItemExpand="OnExpand" OnClientItemCollapse="OnCollapse"
                        OnItemClick="RadPanelBarAnagrafe_ItemClick">
                        <Items>
                            <telerik:RadPanelItem Text="3) Fatture" Value="pnlDataAnagafica">
                                <Items>
                                    <telerik:RadPanelItem Value="Grid">
                                        <ItemTemplate>
                                            <div class="panelBoxIn">
                                                <%-- <telerik:RadGrid ID="grdFatture" runat="server" DataSourceID="ObjectDataSourceFatture"
                                                    GridLines="None" Visible="False" AutoGenerateColumns="False" OnGridCreated="OnGridCreated"
                                                    AllowPaging="True" PageSize="15">
                                                    <MasterTableView>
                                                    </MasterTableView>
                                                </telerik:RadGrid>--%>
                                                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </div>
        </div>
        </form>
    </body>
    </html>
    using System;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
      
    using System.Data;
    using System.Configuration;
    using System.Web.Security;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Telerik.Web.UI;
      
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
      
        protected void RadPanelBarContratti_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            /* 
            RadGrid grdContratti = (RadGrid)RadPanelBarContratti.FindItemByValue("Grid").FindControl("grdContratti");
            if (!grdContratti.Visible)
            {
                grdContratti.Visible = true;
                base.ConfigGrid(ref grdContratti);
                //grdContratti.DataBind();
            }
            */
      
           //Simulate grid bind time with thread
            System.Threading.Thread.Sleep(15000);
            Label lblContratti = (Label)RadPanelBarContratti.FindItemByValue("Grid").FindControl("Label1");
            lblContratti.Text = "Bind Finish!";
        }
      
        protected void RadPanelBarFatture_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            /*
            RadGrid grdFatture = (RadGrid)RadPanelBarFatture.FindItemByValue("Grid").FindControl("grdFatture");
            if (!grdFatture.Visible)
            {
                grdFatture.Visible = true;
                base.ConfigGrid(ref grdFatture);
                //grdFatture.DataBind();
            }
            */
      
            //Simulate grid bind time with thread
            System.Threading.Thread.Sleep(10000);
            Label lblContratti = (Label)RadPanelBarFatture.FindItemByValue("Grid").FindControl("Label1");
            lblContratti.Text = "Bind Finish!";
        }
      
        protected void RadPanelBarAnagrafe_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            /*
            RadGrid grdFatture = (RadGrid)RadPanelBarFatture.FindItemByValue("Grid").FindControl("grdFatture");
            if (!grdFatture.Visible)
            {
                grdFatture.Visible = true;
                base.ConfigGrid(ref grdFatture);
                //grdFatture.DataBind();
            }
            */
      
            //Simulate grid bind time with thread
            System.Threading.Thread.Sleep(5000);
            Label lblContratti = (Label)RadPanelBarBarAnagrafe.FindItemByValue("Grid").FindControl("Label1");
            lblContratti.Text = "Bind Finish!";
        }
    }
  2. Vasil
    Admin
    Vasil avatar
    1642 posts

    Posted 10 Mar 2011 Link to this post

    Hi Francesco,

    Yes, you can use only one loading panel for the tree panels. You also have to fix the ajax settings and the loading panel should be showing and hiding properly. You can try the code-bellow:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxPanelFatture">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelFatture" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:AjaxUpdatedControl ControlID="panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:AjaxUpdatedControl ControlID="Panel1Contratti" LoadingPanelID="RadAjaxLoadingPanel1" />
          </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxPanelContratti">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelFatture" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:AjaxUpdatedControl ControlID="panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:AjaxUpdatedControl ControlID="Panel1Contratti" LoadingPanelID="RadAjaxLoadingPanel1" />
          </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="panel2">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelFatture" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:AjaxUpdatedControl ControlID="panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:AjaxUpdatedControl ControlID="Panel1Contratti" LoadingPanelID="RadAjaxLoadingPanel1" />
          </UpdatedControls>
        </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <asp:Panel ID="PanelFatture" runat="server">
    </asp:Panel>
    <asp:Panel ID="Panel1" runat="server">
    </asp:Panel>
    <asp:Panel ID="Panel1Contratti" runat="server">
    </asp:Panel>

    All the best,
    Vasil
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Francesco
    Francesco avatar
    16 posts
    Member since:
    Mar 2011

    Posted 10 Mar 2011 Link to this post

    Hi Vasil, thanks you for your replay, but I haven’t understand your example. In my scenario the RadAjaxManager have set the property RequestQueueSize="10" this is very important because when I have click on 1 panel and the bind start, if I click on the other panel (during the bind) I would like to queue the request. THis work great but when the first bind end request and the server  enqueue and start the second post back call all loader hide. Each  loader start correctly then  I click on his panel. I don’t want the start all loader if I have click in only on i1 panel. In Your scenario all loader start and is not correct. I have change my RadAjaxManager setting but the result are the same.
    Important:

    You have to simulate the call back call sleep (see my example) otherwise you not reply the bug scenario. I hope you reply me, thank a lot.

     

     

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" RequestQueueSize="10">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanelFatture" >
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelFatture" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1Contratti">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1Contratti" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>

     

     

  4. Vasil
    Admin
    Vasil avatar
    1642 posts

    Posted 14 Mar 2011 Link to this post

    Hi Francesco,

    I wrote the code bellow trying to replicate the issue.
    When I click on Button1 a loading panel is shown over the Panel1. Then if I click on Button2 a loading panel will be shown over Panel2.
    After 2 seconds loading panel over panel1 is hiding. And the loading panel over Panel2 stays for 2 seconds more.
    So the loading panels are not hiding together after the first request is completed. And I am not able to replicate the problem that you are experiencing. Can you make a sample, that shows the wrong behavior?

    <body>
      <form id="form1" runat="server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      </telerik:RadScriptManager>
      <script runat="server" type="text/C#">
        protected void Button1_Click(object sender, EventArgs e)
        {
          Button1.Text = Button1.Text + "a";
          System.Threading.Thread.Sleep(2000);
        }
        protected void Button2_Click(object sender, EventArgs e)
        {
          Button2.Text = Button2.Text + "b";
          System.Threading.Thread.Sleep(2000);
        }
      </script>
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" RequestQueueSize="10">
        <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="Button2">
            <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
          </telerik:AjaxSetting>
        </AjaxSettings>
      </telerik:RadAjaxManager>
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
      </telerik:RadAjaxLoadingPanel>
      <div>
        <asp:Panel runat="server" ID="Panel1">
          <asp:Button runat="server" ID="Button1" OnClick="Button1_Click" Text="Button1" />
        </asp:Panel>
        <asp:Panel runat="server" ID="Panel2">
          <asp:Button runat="server" ID="Button2" OnClick="Button2_Click" Text="Button2" />
        </asp:Panel>
      </div>
      </form>
    </body>

    Best wishes,
    Vasil
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Francesco
    Francesco avatar
    16 posts
    Member since:
    Mar 2011

    Posted 14 Mar 2011 Link to this post

    hi, your example works right. I have change some setting in my code but not resolve the problem.
    I will have attached the full page code of my exemple, and a screenshot of running code.

    P.S. Can I stop the call to the server in the event onCollapse? I wish that the event "collapse" do not call the server but only collapsing the panel.

    Thans a lots.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
        <style type="text/css">
            .panelBoxOut
            {
                min-height: 90px;
            }
            .panelBoxIn
            {
                min-height: 35px;
            }
        </style>
    </head>
    <body>
      
        <script type="text/javascript">
            function OnExpand(sender, eventArgs) {
                //logEvent("On expand: " + eventArgs.get_item().get_text());
            }
      
            function OnCollapse(sender, eventArgs) {
                //logEvent("On collapse: " + eventArgs.get_item().get_text());
                //how to Stop postback???
                //return false;
            }
        </script>
      
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" RequestQueueSize="10">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadPanelBarFatture" >
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelFatture" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadPanelBarContratti">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1Contratti" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadPanelBarBarAnagrafe">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>
        <div>
            <div>
                <telerik:RadAjaxPanel ID="RadAjaxPanel1Contratti" runat="server">
                    <telerik:RadPanelBar runat="server" ID="RadPanelBarContratti" AllowCollapseAllItems="True"
                        Width="100%" CssClass="panelBoxOut" OnClientItemExpand="OnExpand" OnClientItemCollapse="OnCollapse"
                        OnItemClick="RadPanelBarContratti_ItemClick">
                        <Items>
                            <telerik:RadPanelItem Text="1) Contratti" Value="pnlDataAnagafica">
                                <Items>
                                    <telerik:RadPanelItem Value="Grid">
                                        <ItemTemplate>
                                            <div class="panelBoxIn">
                                                <%--<telerik:RadGrid ID="grdContratti" runat="server" DataSourceID="ObjectDataSourceContratti"
                                                    GridLines="None" Visible="False" AutoGenerateColumns="False">
                                                    <MasterTableView>
                                                    </MasterTableView>
                                                </telerik:RadGrid>--%>
                                                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </div>
            <div>
                <telerik:RadAjaxPanel ID="RadAjaxPanelFatture" runat="server">
                    <telerik:RadPanelBar runat="server" ID="RadPanelBarFatture" CssClass="panelBoxOut"
                        AllowCollapseAllItems="false" Width="100%" OnClientItemExpand="OnExpand" OnClientItemCollapse="OnCollapse"
                        OnItemClick="RadPanelBarFatture_ItemClick">
                        <Items>
                            <telerik:RadPanelItem Text="2) Fatture" Value="pnlDataAnagafica">
                                <Items>
                                    <telerik:RadPanelItem Value="Grid">
                                        <ItemTemplate>
                                            <div class="panelBoxIn">
                                                <%-- <telerik:RadGrid ID="grdFatture" runat="server" DataSourceID="ObjectDataSourceFatture"
                                                    GridLines="None" Visible="False" AutoGenerateColumns="False" OnGridCreated="OnGridCreated"
                                                    AllowPaging="True" PageSize="15">
                                                    <MasterTableView>
                                                    </MasterTableView>
                                                </telerik:RadGrid>--%>
                                                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </div>
            <div>
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                    <telerik:RadPanelBar runat="server" ID="RadPanelBarBarAnagrafe" CssClass="panelBoxOut"
                        AllowCollapseAllItems="false" Width="100%" OnClientItemExpand="OnExpand" OnClientItemCollapse="OnCollapse"
                        OnItemClick="RadPanelBarAnagrafe_ItemClick">
                        <Items>
                            <telerik:RadPanelItem Text="3) Anagrafe" Value="pnlDataAnagafica">
                                <Items>
                                    <telerik:RadPanelItem Value="Grid">
                                        <ItemTemplate>
                                            <div class="panelBoxIn">
                                                <%-- <telerik:RadGrid ID="grdFatture" runat="server" DataSourceID="ObjectDataSourceFatture"
                                                    GridLines="None" Visible="False" AutoGenerateColumns="False" OnGridCreated="OnGridCreated"
                                                    AllowPaging="True" PageSize="15">
                                                    <MasterTableView>
                                                    </MasterTableView>
                                                </telerik:RadGrid>--%>
                                                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </div>
        </div>
        </form>
    </body>
    </html>
    using System;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
      
    using System.Data;
    using System.Configuration;
    using System.Web.Security;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Telerik.Web.UI;
      
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
      
        protected void RadPanelBarContratti_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            /* 
            RadGrid grdContratti = (RadGrid)RadPanelBarContratti.FindItemByValue("Grid").FindControl("grdContratti");
            if (!grdContratti.Visible)
            {
                grdContratti.Visible = true;
                base.ConfigGrid(ref grdContratti);
                //grdContratti.DataBind();
            }
            */
      
           //Simulate grid bind time with thread
            System.Threading.Thread.Sleep(15000);
            Label lblContratti = (Label)RadPanelBarContratti.FindItemByValue("Grid").FindControl("Label1");
            lblContratti.Text = "Bind Finish!";
        }
      
        protected void RadPanelBarFatture_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            /*
            RadGrid grdFatture = (RadGrid)RadPanelBarFatture.FindItemByValue("Grid").FindControl("grdFatture");
            if (!grdFatture.Visible)
            {
                grdFatture.Visible = true;
                base.ConfigGrid(ref grdFatture);
                //grdFatture.DataBind();
            }
            */
      
            //Simulate grid bind time with thread
            System.Threading.Thread.Sleep(10000);
            Label lblContratti = (Label)RadPanelBarFatture.FindItemByValue("Grid").FindControl("Label1");
            lblContratti.Text = "Bind Finish!";
        }
      
        protected void RadPanelBarAnagrafe_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            /*
            RadGrid grdFatture = (RadGrid)RadPanelBarFatture.FindItemByValue("Grid").FindControl("grdFatture");
            if (!grdFatture.Visible)
            {
                grdFatture.Visible = true;
                base.ConfigGrid(ref grdFatture);
                //grdFatture.DataBind();
            }
            */
      
            //Simulate grid bind time with thread
            System.Threading.Thread.Sleep(5000);
            Label lblContratti = (Label)RadPanelBarBarAnagrafe.FindItemByValue("Grid").FindControl("Label1");
            lblContratti.Text = "Bind Finish!";
        }
    }


  6. Vasil
    Admin
    Vasil avatar
    1642 posts

    Posted 17 Mar 2011 Link to this post

    Hello Francesco,

    We logged this behavior of the loading panel as a bug and our developers will fix it.

    For colapsing the RadPanelBar client-side you can handle OnClientItemClicking event. Please also see this help topic.

    Greetings,
    Vasil
    the Telerik team
Back to Top