Load LoadingPanel while waiting for data to be returned

3 posts, 0 answers
  1. Newton
    Newton avatar
    2 posts
    Member since:
    Feb 2013

    Posted 05 Feb 2013 Link to this post

    Hi,
     I.m trying to load the RadAjaxLoadingPanel while waiting for data to be returned from db that has been queried through the autocompletebox.
      Any ideas on how to do this?
    Regards
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 11 Feb 2013 Link to this post

    Hello Newton,

    Please accept our apologies for the delay.

    You can try to show/hide the RadAjaxLoadingPanel explicitly by handling the OnClientRequesting and OnClientRequested in this way:
    <script type="text/javascript">
      
        var currentLoadingPanel = null;
        var currentUpdatedControl = null;
      
        function OnClientRequesting(sender, eventArgs) {
            currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>");
            currentLoadingPanel.show(sender._uniqueId);
        }
        function OnClientRequested(sender, eventArgs) {
            currentLoadingPanel.hide(sender._uniqueId);
        }
    </script>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1"
                runat="server" Skin="Windows7">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAutoCompleteBox runat="server" ID="RadAutoComplete1"
                OnClientRequesting="OnClientRequesting"
                OnClientRequested="OnClientRequested"
                DataTextField="ProductName" DataValueField="ProductID">
            </telerik:RadAutoCompleteBox>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
               ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString1 %>"
                SelectCommand="SELECT * FROM [Products]"></asp:SqlDataSource>
        </div>
        </form>
    </body>


    All the best,
    Kalina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Richard
    Richard avatar
    3 posts
    Member since:
    Oct 2010

    Posted 12 Mar 2013 Link to this post

    I am trying to do the same thing.  This example works perfectly.  Thanks!
Back to Top