asp.net mvc - Kendo MVC Grid ClientTemplate will lead to "Field not defined" -


i have kendo mvc grid read action can done successfully

@(html.kendo().grid<mymodel>()    .name("name")    .autobind(false)    .columns(columns =>    {      ...      columns.bound(c => c.itemcode).clienttemplate("#= itemcode #").title("item").width(300);    })    .pageable(page =>    {      page.enabled(true);    })    .scrollable(s => s.height(400))    .sortable(s => s.enabled(false))    .editable(ed => ed.mode(grideditmode.popup).templatename("materialformeditor").window(w => { w.title(""); w.width(700); }).displaydeleteconfirmation(false))    .datasource(datasource => datasource    .ajax()    .pagesize(20)    .model(model => model.id(p => p.jobno))    .read(read => read.action(...)    .serveroperation(true)    )  )

  public class mymodel      {          public string itemcode;      }

(above code simplified, clienttemplate content field value itself, yet problem still can reproduced)

now problem is, when click "add new record" button, javascript error comes out , no window popped up.

the error said: uncaught referenceerror: itemcode not defined

yet when delete .clienttemplate(), goes right.

what cause of error , how can solve it?


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -