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

AutoCompleteBox busy state

1 Answer 24 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 25 Mar 2014, 09:52 PM
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#

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 28 Mar 2014, 03:51 PM
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.

 
Tags
AutoCompleteBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or