I have a simple grid and try to get the updated row on server side but the model send is always empty
Client side Grid (View)
<div class="card-body">
@(Html.Kendo().Grid<CoopTel_MultiLocation.Models.DummyModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.Col1).Filterable(false);
columns.Bound(p => p.Col2);
columns.Bound(p => p.Col3);
columns.Bound(p => p.Col4);
columns.Bound(p => p.Col5);
columns.Bound(p => p.TestBooleen);
columns.Command(command => { command.Edit(); command.Destroy(); }).Title("Commandes").Width(250);
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.ToolBar(toolbar =>
{
toolbar.Search();
toolbar.Create();
})
.HtmlAttributes(new { style = "height:550px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(model => { model.Id(p => p.Col1); })
.Read(read => read.Action("GetLocationUI", "GestionLocation"))
.Update(update => update.Action("DetailLocationUpdate", "GestionLocation"))
.Destroy(destroy => destroy.Action("DetailLocationDestroy", "GestionLocation"))
.Create(update => update.Action("DetailLocationCreate", "GestionLocation"))
)
)
</div>
GestionLocationController
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult DetailLocationUpdate([DataSourceRequest] DataSourceRequest request, DummyModel Locations) <-- Location is always empty
{
return Json("");
}