Hi guys,
my viewModel:
var uploadVM = kendo.observable({
onUpload: function(e) {
Codes Here
}
});
editTemplate
<
script
type
=
"text/x-kendo-tmpl"
id
=
"editTemplate"
>
<
div
class
=
"product-view k-widget"
>
<
dl
>
<
dt
>Product Photo</
dt
>
<
div
>
<
input
id
=
"editUpload"
name
=
"itemPic"
type
=
"file"
data-role
=
"upload"
data-model
=
"uploadVM"
data-bind
=
"events: { upload: onUpload }"
data-multiple
=
"false"
data-async="{
saveUrl: saveURL,
removeUrl: removeURL,
removeVerb: 'DELETE',
autoUpload: true
}" />
</
div
>
</
dl
>
<
div
class
=
"edit-buttons"
>
<
a
class
=
"k-button k-update-button"
href
=
"\\#"
><
span
class
=
"k-icon k-update"
></
span
></
a
>
<
a
class
=
"k-button k-cancel-button"
href
=
"\\#"
><
span
class
=
"k-icon k-cancel"
></
span
></
a
>
</
div
>
</
div
>
</
script
>
listView initiate with
var listView = $("#product-listview").kendoListView({
dataSource: ListViewDataSource,
template: kendo.template($("#template").html()),
editTemplate: kendo.template($("#editTemplate").html())
}).data("kendoListView");
but The UPLOAD event: upload work with error message: Uncaught TypeError: n is not a function
Any suggestion will be appreciated.