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

Web ListView search and autocomplete

1 Answer 89 Views
ListView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 03 Sep 2013, 07:04 PM
is there a way to tie autocomplete to listview results? What I'm trying to do it to use autocomplete search box, and as results come in, populat listview.

thanks

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 04 Sep 2013, 11:11 AM
Hello John,

This functionality is not supported out of the box, however you could achieve similar behavior using the Autocomplete's ul property which is holding the available suggestions. You could attach a handler to the input element's keydown event and list display the Autocomplete suggestions, for example:
$("#autocomplete").on("keydown", function(e){
  setTimeout(function(){$("#countries").data("kendoAutoComplete").ul.children().each(function(){console.log(this.innerText)})},250);
});

The default delay for displaying the suggestions popup is 200ms, so I've added a setTimeout function with the a slightly longer delay to ensure the popup is indeed displayed.
 

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
John
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or