RadAutoCompleteTextView: Event Listeners

In this article you are going to learn about the RadAutoCompleteTextView's event listeners. The event listeners are designed to notify you whenever a particular action, in the workflow of the control, has happened. They are quite useful when it comes to executing logic based on the RadAutoCompleteTextView's state.

Available listeners

The RadAutoCompleteTextView control exposes five different event listeners.

All five of the listeners have identical logical structure and identical workflow, the only difference between them is the event which they are observing and notifing you about.

Usage

In order to get notified when one of the above-mentioned events occur, you should use the following structure with the type of listener you want to use.

        autocomplete.addTokenAddedListener(new TokenAddedListener() {
            @Override
            public void onTokenAdded
            (RadAutoCompleteTextView radAutoCompleteTextView, TokenModel tokenModel) {
                // do something
            }
        });
    this.autocomplete.AddTokenAddedListener(new TokenAddedListenerImpl());

            class TokenAddedListenerImpl : Java.Lang.Object, ITokenAddedListener
        {
            public void OnTokenAdded(RadAutoCompleteTextView p0, TokenModel p1)
            {
                // do something
            }
        }