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

Select an item from Javascript

1 Answer 64 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
ghini
Top achievements
Rank 2
ghini asked on 08 Jan 2015, 11:31 AM
Hello everyone,
I'm working with radAutoCompleteBox.
Is there a way to select an item from Javascript?

Thanks

1 Answer, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 09 Jan 2015, 03:11 PM
Hi ghini,

You can add an entry in the RadAutoCompleteBox using the Client-Side API.
For example:
function addNewEntry(sender, args) {
    var autoCompleteBox = $find("<%= RadAutoCompleteBox1.ClientID %>");
    var textBox = $find("RadTextBox1");
    if (textBox.get_value() == "") return;
    var entry = new Telerik.Web.UI.AutoCompleteBoxEntry();
    entry.set_text(textBox.get_value());
    autoCompleteBox.get_entries().add(entry);
}

If this is not what you are looking for, could you please explain in more details what is the exact functionality you want to achieve(perhaps you can give us an example)?

Regards,
Aneliya Petkova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
AutoCompleteBox
Asked by
ghini
Top achievements
Rank 2
Answers by
Aneliya Petkova
Telerik team
Share this question
or