MVVM Grid with Popup Template

4 posts, 0 answers
  1. Richard
    Richard avatar
    7 posts
    Member since:
    Sep 2011

    Posted 18 Jun 2012 Link to this post


    I've created a grid and bound to an observable via MVVM, all went fine.

    Now I'm trying to implement a custom popup template for the grid with the following:

        data-editable='{"mode": "popup", "template": "kendo.template($(/"#popup/").html())"}'
        data-columns='[{"field": "CustomerAddressType_Name", "title": "Type", "width": "70px"}, {"field": "CustomerAddress_Line1", "title": "Line 1"}, {"field": "CustomerAddress_Postcode", "title": "Postcode"}, {"field": "Country_Name", "title": "Country"}, {"command": [ "edit", "destroy" ], "filterable": false, "sortable": false, "width:": "240px"}]'
        data-bind="source: addresses()"></div>

    I believe the line:

     data-editable='{"mode": "popup", "template": "kendo.template($(/"#popup/").html())"}' co

    is incorrect though as I'm getting an invalid template error.

    Would some kindly point me in the right direction please?

    Many thanks.
  2. Brad Sumner
    Brad Sumner avatar
    28 posts
    Member since:
    Dec 2009

    Posted 03 Jul 2012 Link to this post


    I'm running into the same issue as your are and was wondering if you found a solution.  I've tried various forms of escaping and can't get it to work either.  I'm getting an error or in the latest form below the text  kendo.template($("#editTemplate").html()) appears in the popup window. 

    '{ "mode": "popup", "template": "kendo.template($(\"\\#editTemplate\").html())" }'

  3. Kerry
    Kerry avatar
    4 posts
    Member since:
    Jun 2012

    Posted 13 May 2013 Link to this post

    Just to speed up anybody else with this error, leave off the quotes around kendo.template.

    data-editable='{"mode": "popup", "template": kendo.template($("#editTemplate").html()) }' 
  4. jj
    jj avatar
    1 posts
    Member since:
    Mar 2015

    Posted 24 Mar 2015 Link to this post

    Hi, is this working? I am getting error still
Back to Top