OK, the sync is happening before the grid registers that the field has changed. The original data is passed back to the server, not the updated data. When I try to update the same cell again, it passes the first edit through to the controller.
What am I missing?
.cshtml:
@(Html.Kendo()
.Grid<
TestKendoGrid.Models.myTransaction
>()
.Name("Grid")
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Columns(columns =>
{
columns.Bound(o => o.TranDt).Width(150);
columns.Bound(o => o.Description).Width(300);
columns.Bound(o => o.Category).Width(125);
columns.Bound(o => o.Amount).Width(100).Format("{0:c}");
columns.Bound(o => o.TranID);
columns.Command(command => command.Destroy()).Width(200);
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.TranID))
.Events(events => events.Error("error_handler"))
.Create(create => create.Action("_CreateTransactionKendo", "Home"))
.Read(read => read.Action("_SelectTransactionsKendo", "Home"))
.Update(update => update.Action("_SaveTransactionKendo", "Home"))
.Destroy(destroy => destroy.Action("_DeleteTransactionKendo", "Home"))
.Batch(true))
.Pageable()
.ToolBar(commands => { commands.Create(); commands.Save(); })
.Events(ev => ev.Save("function(e) { this.dataSource.sync() }"))