or
.Model(model =>{ model.Id<string>(p => p.SalesRep.Id);}@(Html.Kendo().Grid<SalesRepViewModel>() .Name("SalesRepsGrid") .Columns(columns => { columns.Bound(p => p.SalesRep).ClientTemplate("#=data.SalesRep.Name#"); columns.Bound(p => p.SplitPercentage).Width(100); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(GridEditMode.InLine)) .DataSource(dataSource => dataSource .Ajax() .Events(events => events.Error("error_handler")) .Model(model => { model.Id<string>(p => p.SalesRep.Id); model.Field(p => p.SalesRep.Id).Editable(false); model.Field(p => p.SplitPercentage).Editable(true); model.Field(p => p.SalesRep).DefaultValue( ViewData["defaultSalesRep"] as NamedReferenceBindingModel<string>); }) .Read(read => read.Action("SalesReps_Read", "PurchaseAgreement")) .Create(update => update.Action("SalesReps_Create", "PurchaseAgreement", new { purchaseAgreementId = Model.Id })) .Update(update => update.Action("SalesReps_Update", "PurchaseAgreement", new { purchaseAgreementId = Model.Id })) .Destroy(destroy => destroy.Action("SalesReps_Destroy", "PurchaseAgreement", new { purchaseAgreementId = Model.Id })) ) )