mvvm binding with templates and kendoListView

2 posts, 0 answers
  1. Chris
    Chris avatar
    4 posts
    Member since:
    Jul 2013

    Posted 27 Sep 2017 Link to this post

    I am trying to use mvvm binding within a template that is applied to a kendo list view.  Template variables are working but the data-bind attributes are not.  Is this supported?  

    <div id="list"></div>
    <script id="template" type="text/x-kendo-template">
        <button data-bind="visible:  alreadyAttending, click: onClick">
            Your id is ${ID}
    var data = [];
    data[0] = { alreadyAttending:  true, ID:  1, onClick:  function() { alert("Click 1"); }};
    data[1] = { alreadyAttending:  false, ID:  2, onClick:  function() { alert("Click 2"); }};
       dataSource: data,
       template: kendo.template($("#template").html())



  2. Tsvetina
    Tsvetina avatar
    2133 posts

    Posted 29 Sep 2017 Link to this post

    Hello Chris,

    The MVVM bindings would work only if the ListView itself is created inside an MVVM environment. Here is the updated Fiddle where the bindings work:

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top