This question is locked. New answers and comments are not allowed.
Hi,
I'm trying to use the AutocompleteBox with a datasource bound to a service that returns XML. At the moment the request to the service only seems to fire once. Also I can't get the Search suggestions to show up. Below are details, can you tell me what I'm doing wrong?
Thanks,
Michael
I'm trying to use the AutocompleteBox with a datasource bound to a service that returns XML. At the moment the request to the service only seems to fire once. Also I can't get the Search suggestions to show up. Below are details, can you tell me what I'm doing wrong?
Thanks,
Michael
WinJS.UI.Pages.define("/pages/tvshows.html", { // This function is called whenever a user navigates to this page. It // populates the page elements with the app's data. ready: function (element, options) { var dataSourceAutoCompleteCtrl = new Telerik.UI.RadAutoCompleteBox(document.getElementById('dataSourceAutoComplete'), { minLength: 2, dataTextField: "short", filter: "contains", dataSource: { type: "xml", transport: { read: { data: { term: function () { return dataSourceAutoCompleteCtrl.value; }, oauth_consumer_key: apiKey } }, schema: { type: "xml", data: "autocomplete_item/title" } } } }); },Example XML that is being returned on the first call given a query of 'Dexter' . I'm trying to get the title attribute to show up as a suggestion.
<?xml version="1.0" standalone='yes'?><autocomplete> <url_template>http://api-public.netflix.com/catalog/titles/autocomplete?{-join|&|term}</url_template> <autocomplete_item> <title short="Dexter's Laboratory: Season 1"></title> </autocomplete_item> <autocomplete_item> <title short="Dexter"></title> </autocomplete_item> <autocomplete_item> <title short="Dexter Gordon and McCoy Tyner: Cool Summer"></title> </autocomplete_item> <autocomplete_item> <title short="Dexterity: Reggae Madness"></title> </autocomplete_item> <autocomplete_item> <title short="Dexter Darden"></title> </autocomplete_item> <autocomplete_item> <title short="Jazz Icons: Dexter Gordon: Live in '63 & '64"></title> </autocomplete_item></autocomplete>