Hello, John,
I tested the project that I shared here and edited the main item as well as the child items. I recorded a video so you can see my steps and let me know in case I have missed anything:
https://www.screencast.com/t/MgGO7XSXN
As for the private thread with Brian, I responded to him but I have not heard back from him so I am unsure if the response was helpful. Nonetheless, I will share it with you:
===========================================================
1) The Foreign Key column should have a default value
.Model(model =>
{
model.Id(p => p.equipmentUid);
model.Field(p => p.equipmentUid).Editable(false);
model.Field(p => p.equipmentAttributeTypeUid).DefaultValue(1);
})
2) It is not necessary to declare the foreign key editor again in the popup template as the values are already available. You can decorate the model with the [UIHint("GridForeignKey")] which should be located in /Views/Shared/EditorTemplates and contain the following
@model object
@(
Html.Kendo().DropDownListFor(m => m)
.BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
)
3) The field equipmentLoc does not bind correctly to its value because the Name() does not match the property name. And this is valid for all the properties that should be edited.
https://docs.telerik.com/aspnet-mvc/helpers/grid/templating/editor-templates
Either use:
DropDownListFor(m=>m.equipmentLoc)
the DropDownList()
.Name("equipmentLoc")
5) The grid in the popup, I cannot tell what the model properties are, however if any of them are complex, you should provide a DefaultValue() for each of them When a new record is created, the grid data source adds a model with these values to its data source so a new row can be added
https://demos.telerik.com/aspnet-mvc/grid/editing-custom
Regards,
Alex Hajigeorgieva
Progress Telerik
Progress is here for your business, like always.
Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.