jquery - how to define kendo model for nested object -


i need help.

i'm in trouble kendo ui. need define nested kendo model. server side give object has other object.

f.e have constantitem object , object has attribute costitem object. server side returns me constantitem object , include oid,lastupdated,name,info,costitem.

here kendo model.

    var constantitemmodel = kendo.data.model.define({          id:"oid",         fields:{             oid:{                 editable:false,                 nullable:true,                 type:"string"             },             lastupdated:{                 editable:false,                 nullable:true,                 type:"string"             },             amount:{                 editable:true,                 nullable:true,                 type:"number"             },             costitem:{                 defaultvalue:{}             }         }     }); 

as see need define model costitem:{ defaultvalue:{} } here. need model here. because have define values variables here.

could me please? how solve this?

properties can written in string , there can use dot notation.

dojo example


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -