Event bind in ListView editTemplate doesn’t work properly

2 posts, 0 answers
  1. Jodow
    Jodow avatar
    1 posts
    Member since:
    Oct 2014

    Posted 10 Dec 2015 Link to this post

    Hi guys,

    my viewModel:


    var uploadVM = kendo.observable({
        onUpload: function(e) {
            Codes Here



    <script type="text/x-kendo-tmpl" id="editTemplate">
        <div class="product-view k-widget">
                <dt>Product Photo</dt>
                    <input id="editUpload" name="itemPic"
                        data-bind="events: { upload: onUpload }"
                            saveUrl: saveURL,
                            removeUrl: removeURL,
                            removeVerb: 'DELETE',
                            autoUpload: true
                        }" />
            <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>

    listView initiate with


    var listView = $("#product-listview").kendoListView({
        dataSource: ListViewDataSource,
        template: kendo.template($("#template").html()),
        editTemplate: kendo.template($("#editTemplate").html())

    but The UPLOAD event: upload work with error message: Uncaught TypeError: n is not a function

    Any suggestion will be appreciated.

  2. Petyo
    Petyo avatar
    2437 posts

    Posted 15 Dec 2015 Link to this post

    Hello Jodow,


    for the mvvm bindings in the template to work as expected, the listview should be instantiated with data-role="listview" attribute - you are currently instantiating the widget with the jQuery plugin syntax. 


    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top