asp.net mvc - Update Kendo grid with editor dropdownlist value -


i have kendo grid set so:

@(html.kendo().grid<participatingdentalee>() .name("dentalee") .columns(columns => {     columns.bound(p => p.state).title("state").width(150).editortemplatename("state");     columns.bound(p => p.count).title("count").width(150);     columns.command(c => { c.edit(); c.destroy(); }); }) .datasource(datasource => datasource     .ajax()                .model(m => {         m.id(p => p.state);         m.field(p => p.state).editable(true);         m.field(p => p.count).editable(true).defaultvalue("");     })     .create(update => update.action("editinginline_create", "dental"))     .read(read => read.action("editinginline_read", "dental"))     .update(update => update.action("editinginline_update", "dental"))     .destroy(update => update.action("editinginline_destroy", "dental")) ) //.scrollable() //.sortable() .editable(e => e.mode(grideditmode.inline)) 

)

the "state" column consists of dropdown template looks this:

@(html.kendo().dropdownlist()     .name("states") // name of widget should same name of property     .datavaluefield("code") // value of dropdown taken employeeid property     .datatextfield("name") // text of items taken employeename property     .bindto((system.collections.ienumerable)viewdata["states"]) // list of employees populated in controller ) 

my dropdown shows when edit or create item, when save item dropdown value not stay in grid. there else need set in order this?

as in own comment,

.name("states") // name of widget should same name of property 

which say, must match name of column, , column name "state" not "states".


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -