I'm trying to setup auto-completion on a single column in my grid. This is being implemented in a backbone+marionette app. I'm following this example for the implementation http://jsfiddle.net/OnaiBai/Naka3/18.
The view is instantiated in my controller. Nothing happens when I enter text into the input box. Also there aren't any JS errors.
I can include more of the code if necessary. Any ideas on how I can get the auto-completion to work.
Template App.Templates.Search.SearchBoxStuff :
<
label
class
=
"search-label"
for
=
"searchBox"
>Search Grid:</
label
>
<
input
type
=
"search"
id
=
"searchBox"
class
=
"k-textbox text-input"
>
View:
App.SearchStuff.GridView = App.Common.Widgets.Grid.extend({
/**
* Constructor
*/
constructor:
function
(options) {
App.Common.Widgets.Grid.call(
this
,
_.extend({
toolbar: [
{ template: App.Templates.Search.SearchBoxStuff }
],
dataSource: {
type:
'odata'
,
pageSize: 100,
serverFiltering:
true
,
serverPaging:
true
,
serverSorting:
true
,
sort: {
field:
'name'
,
dir:
'asc'
},
schema: {
model: {
fields: {
id: {type:
'number'
},
name: {type:
'string'
}
}
}
},
transport: {
read: {
url:
'/api/package/search/v1'
,
dataType:
'json'
,
type:
'POST'
,
contentType:
'application/json'
},
parameterMap: _.bind(
this
._parameterMap,
this
)
}
},
height: 700,
scrollable: {
virtual:
true
},
selectable:
'row'
,
sortable:
true
,
pageable:
false
,
columns: [{
field:
'name'
,
title:
'Name'
}
}, options));
$(
'.text-input'
).kendoAutoComplete({
dataTextField:
'name'
,
dataVextField:
'name'
,
dataSource:
this
.dataSource
});
},