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

How to reset completely all entries programmatically (server side)?

2 Answers 61 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Yan Moura
Top achievements
Rank 1
Veteran
Iron
Yan Moura asked on 01 Jul 2020, 06:30 PM

I need a way of reset all entries from AutoCompleteBox including:

1) Remove all entries from the entries array; and

2) Remove all tokens from text box

I need to do this programmatically in server side code.

 

Thanks!

2 Answers, 1 is accepted

Sort by
0
Yan Moura
Top achievements
Rank 1
Veteran
Iron
answered on 01 Jul 2020, 06:43 PM

I tried this but it is returning me an "Index out of range" error:

Dim mycount As Integer = RadAutoCompleteBox1.Entries.Count
Dim i As Integer
For i = 0 To mycount-1
   RadAutoCompleteBox1.Entries.RemoveAt(i)
Next

Any idea?

0
Peter Milchev
Telerik team
answered on 03 Jul 2020, 09:33 AM

Hello Yan,

You can try the .Clear() method of the Entries collection and setting an empty string to the .Text property of the AutoCompleteBox.

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
AutoCompleteBox
Asked by
Yan Moura
Top achievements
Rank 1
Veteran
Iron
Answers by
Yan Moura
Top achievements
Rank 1
Veteran
Iron
Peter Milchev
Telerik team
Share this question
or