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

sql - VB.NET Operand type clash: date is incompatible with int error -

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

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -