AutoCompleteBox busy state

2 posts, 0 answers
  1. Chris
    Chris avatar
    2 posts
    Member since:
    Aug 2013

    Posted 25 Mar 2014 Link to this post

    I have a very large data set bound to the AutoCompleteBox and there is about a 5 second delay from when the user types some character until the AutoCompleteBox returns the suggestions. Is there a set of events I can subscribe to (e.g. AutoCompleteLookupBegin, AutoCompleteLookupEnd) or a method I can override so that when the look-up starts I can set a busy cursor or indicate to the user that the search is on going? As of right now this delay blocks the UI which isn't a problem as long as we let the user know something is happening.


    Thank You,
    Chris
    ----------
    Telerik Version: Telerik Controls for WinForms Q1 2014
    .Net Version: 4.0
    Language: C#
  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 28 Mar 2014 Link to this post

    Hi Chris,

    Thank you for writing.

    Currently, the RadAutoCompleteBox drop down is not exposed and there is no way to subscribe to its events in order to achieve the desired functionality. I have logged this as a feature request in our Feedback Portal. You can track the item for status changes and add your vote for it here.

    To workaround this limitation you can get the popup with reflection, subscribe to its PopupOpening and PopupOpened events and change the cursor:
    var temp = radAutoCompleteBox1.TextBoxElement.GetType().GetProperty("AutoCompleteDropDown", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(radAutoCompleteBox1.TextBoxElement, null);
    RadPopupControlBase popup = temp as RadPopupControlBase;
     
    popup.PopupOpening += popup_PopupOpening;
    popup.PopupOpened += popup_PopupOpened;
     
    void popup_PopupOpened(object sender, EventArgs args)
    {
        Cursor.Current = Cursors.WaitCursor;
    }
     
    void popup_PopupOpening(object sender, CancelEventArgs args)
    {
        Cursor.Current = Cursors.Default;
    }

    Your Telerik Points have been updated for this request.

    Should you have any other questions do not hesitate to ask.


    Regards,
    Dimitar
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top