MVVM in templates for ListView and Grid editing

2 posts, 0 answers
  1. Jaap
    Jaap avatar
    96 posts
    Member since:
    Oct 2012

    Posted 04 Sep 2012 Link to this post

    Hello,



    I use MVVM style databinding in my templates for the ListView and Grid widget (in case of the Grid I have a template per column).

    That works fine, also when switching to edit mode.

    The problem is that when I switch back from edit mode to readonly. I can see in the debugger that the template is applied again, but the MVVM binding is not done, so no data is displayed. Using a regular template (no MVVM) would work fine.



    (Using Kendo version 2012.1.710)



    Regards, Jaap
  2. Jaap
    Jaap avatar
    96 posts
    Member since:
    Oct 2012

    Posted 04 Sep 2012 Link to this post

    In the Grid I have solved the issue by adding this line at the end of the _displayCell function:

    kendo.bind(cell.children(), dataItem);



    This solves the problem, at least with 'incell' editing. I have not tested it with 'inline' or 'popup' editing.



    Regards, Jaap

  3. Kendo UI is VS 2017 Ready
Back to Top