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

Custom function for autocompletion

0 Answers 78 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 25 Feb 2012, 12:12 PM
Hi!

How can I set custom function for getting autocompletion data?
When i tried code below, read function called twice and I get two dropdown lists in my browser.
How can I make a read function to be called only once? Or what is a proper way to use custom function for returning autocompletion data?
Thanks.

input.kendoAutoComplete({
                dataTextField: 'address',
                dataSource: {
                    serverFiltering: true,
                    transport: {
                        read: function(request) {
                            address = request.data.filter.filters[0].value;
                            geocoder.geocode({'address': address}, function(results, status) {
                                if (results) {
                                    request.success(format_response(results));
                                } else {
                                    request.success([]);
                                }
                            });
                        }
                    }
                }
}

No answers yet. Maybe you can help?

Tags
AutoComplete
Asked by
Igor
Top achievements
Rank 1
Share this question
or