Rad Combobox loading panel issue

3 posts, 1 answers
  1. Karthik
    Karthik avatar
    9 posts
    Member since:
    Nov 2012

    Posted 28 Feb 2013 Link to this post

    Hi,
    Instead of a LoadingMessage = "Loading..." , I would like to add a spinning.gif in combobox. Is it possible???   
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Mar 2013 Link to this post

    Hello Karthik,

    Yes, it is possible to show a custom image instead of the Loading message. Please have a look at the following code I tried.

    ASPX:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox2" LoadingPanelID="AjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Transparency="80" MinDisplayTime="300"
        runat="server">
        <asp:Image ID="l" runat="server" ImageUrl="~/Images/LoadingPanelImage1.gif"  AlternateText="Loading" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadComboBox ID="RadComboBox2" runat="server" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
        OnItemsRequested="RadComboBox2_ItemsRequested" OnClientItemsRequesting="ClientItemsRequesting"
        OnClientItemsRequested="ClientItemsRequested">
    </telerik:RadComboBox>

    JavaScript:
    <script type="text/javascript">
        function ClientItemsRequesting(sender, args) {
            var loadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
            loadingPanel.show(sender.get_id());
        }
        function ClientItemsRequested(sender, args) {
            var loadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
            loadingPanel.hide(sender.get_id());
        
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Karthik
    Karthik avatar
    9 posts
    Member since:
    Nov 2012

    Posted 01 Mar 2013 Link to this post

    Hello Princy,
    Thank you so much for the excellent demo you posted.  It was very helpful.
Back to Top