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

Load LoadingPanel while waiting for data to be returned

2 Answers 45 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Newton
Top achievements
Rank 1
Newton asked on 05 Feb 2013, 02:40 PM
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 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 11 Feb 2013, 07:52 AM
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.
0
Richard
Top achievements
Rank 1
answered on 12 Mar 2013, 07:50 PM
I am trying to do the same thing.  This example works perfectly.  Thanks!
Tags
AutoCompleteBox
Asked by
Newton
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Richard
Top achievements
Rank 1
Share this question
or