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
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
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.