thia my index.cshtml
@(Html.Kendo().Grid<empdepkendo.Models.Employee>
()
.Name("persons")
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(m => m.ID))
.Read(read => read.Action("GetAllEmployees", "Employees"))
.Update(up => up.Action("UpdateEmployee", "Employees"))
)
.Columns(columns =>
{
columns.Bound(c => c.ID).Width(200);
columns.Bound(c => c.FirstName);
columns.Bound(c => c.LastName);
columns.Command( cmd => cmd.Edit());
})
.Pageable()
.Sortable()
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("Person"))
)
/
this EditorTemplat/Person.cshtml
@model empdepkendo.Models.Employee
@(Html.Kendo().Grid<empdepkendo.Models.Employee>
()
.Name("EmpGrid")
.Columns(columns =>
{
columns.Bound(c => c.ID).Width(200);
columns.Bound(c => c.FirstName);
columns.Bound(c => c.LastName);
columns.Command(cmd => cmd.Edit()
);
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(m => m.ID))
.Read(read => read.Action("Editer", "Employees", new { ID })) ///i want to pass the id here
.Update(update=>update.Action("UpdateEmployee","Employees"))
)
)