Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
AjaxIndicator does not display during loadItems()
posted

I can't get the AjaxIndicator to work with the WebDropDown control. Can someone point out what I'm doing wrong?

Also, when the AjaxIndicator is working correctly, will it prevent the user from selecting a value in the WDD while the new values are loading?

I've attached my code as zip, and here is a quick preview:

Here is my markup:
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px"
            DropDownContainerWidth="200px" DropDownContainerHeight="200px"
            onitemsrequested="WebDropDown1_ItemsRequested" EnableAnimations="false">
            <AjaxIndicator Enabled="True" Text="Loading WebDropDown1..." RelativeToControl="True" Location="MiddleInfront" />
            <ClientEvents DropDownOpening="_DropDownOpening" />
        </ig:WebDropDown>

Here is my ItemsRequested event handler:

        protected void WebDropDown1_ItemsRequested(object sender, Infragistics.Web.UI.ListControls.DropDownItemsRequestedEventArgs e)
        {           
            System.Threading.Thread.Sleep(3000);  // simulate a long database call
            string id = System.IO.Path.GetRandomFileName();
            WebDropDown1.Items.Add(new DropDownItem(id));
        }

 

 

AjaxIndicator.zip