RadAutoCompleteBox clear selected item after it is selected.

1 Answer 442 Views
AutoCompleteBox
Roger
Top achievements
Rank 2
Iron
Iron
Iron
Roger asked on 06 Jul 2021, 08:44 PM

So I use the RadAutoCompleteBox to list many options a user can pick that are then added to another textbox.

So once they select it, I take that "Token" and copy it to a "Selected Box".

How would I go about Removing the token after I have copied it in the token validating event.

 

Thanks

 

Rog

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Jul 2021, 01:31 PM
Hello, Rog,

When you select an item from the suggested list in RadAutoCompleteBox, it creates a token ("SampleText;", text+delimiter) in the editable area. Directly managing the Text property allows you to control the displayed tokens and you can add/remove tokens by just managing the Text:
https://docs.telerik.com/devtools/winforms/controls/editors/autocompletebox/text-editing 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,


Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Roger
Top achievements
Rank 2
Iron
Iron
Iron
commented on 02 Mar 2022, 05:25 PM

What event happens after token validating?

 

I have code in the token validating that copies token to another control, but then want text = blank.

I tried to do this in the token validating, but receive runtime error as it seems you cannot change the text while in the token validating event.

 

Thanks,

 

Roger

Dess | Tech Support Engineer, Principal
Telerik team
commented on 03 Mar 2022, 10:17 AM

Hi, Roger,

The TextChanged event is fired after the TokenValidating event containing the new updated Text. You can use a flag which should be enabled in the TokenValidating event and then the next firing of the TextChanged with the enabled flag will help you detect the case and execute the desired action.

I hope this helps.

Tags
AutoCompleteBox
Asked by
Roger
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or