Sunday, 15 May 2011

jquery - Kendo UI grid lastupdated field -



jquery - Kendo UI grid lastupdated field -

having more issues kendo , hoping here might able help me.

i have working kendo grid has popup template edit calls, via ajax method on controller , updates row. fine.

the lastly column on each row lastly updated field supposed update datetime.now on edit.

now because using kendo go , save info there no success method can find nd hence can't homecoming saved info in json format (and hence datetime never edited according grid).

i can't find working event fire javascript function update column client side.

so bit stuck.

anyone able help?

edit: requested here code.

the kendo grid shows effort @ giving default value (didn't work , know why) , shows calling pop up.

@(html.kendo().grid(model.where(x => x.orglevel == 0).first().definedfieldslist) .name("definedlevelsgrid") .columns(columns => { columns.bound(x => x.fieldname).title("name"); columns.bound(x => x.fieldtypetext).title("type"); columns.bound(x => x.ismandatory).title("mandatory"); columns.bound(x => x.defaultvalue).title("default value"); columns.bound(x => x.updatedon).title("updated"); columns.command(command => { command.edit(); command.destroy(); }); }) .editable(editable => editable.mode(grideditmode.popup).templatename("_orgdefinedfieldedit")) .pageable() .sortable() .datasource(datasource => datasource .ajax() .model(model => { model.id(x => x.fieldid); model.field(x => x.updatedon).defaultvalue(datetime.now.tostring()); }) .update(update => update.action("editdefinedfield", "organisationajax")) .destroy(destroy => destroy.action("destroy", "home")) ) )

this template view. tried putting in hidden field lastly updated field didn't pursue that:

@using kendo.mvc.ui; <div id="popupcontainer"> <h2>organisation defined field</h2> <table id="popupedittable"> <tr> <td>name: </td> <td> @html.editorfor(x => x.fieldname) @html.hiddenfor(x => x.updatedon) </td> </tr> <tr> <td>type:</td> <td> @(html.kendo().dropdownlist() .name("fieldtypetext") .datavaluefield("id") .datatextfield("type") .bindto((system.collections.ienumerable)viewdata["fieldtypes"]) ) </td> </tr> <tr> <td>description:</td> <td>@html.editorfor(x => x.description)</td> </tr> <tr> <td>mandatory:</td> <td>@html.checkboxfor(x => x.ismandatory)</td> </tr> <tr> <td>default value:</td> <td>@html.editorfor(x => x.defaultvalue)</td> </tr> </table>

jquery ajax asp.net-mvc kendo-ui kendo-grid

No comments:

Post a Comment