I'd like to suggest creation of form control..
It should be something similar as in datagrid row, so you provide model or datasource, and define controls in form like in datagrid columns, foreign keys, validation and etc..
Form should be able to be attached on some json object but with functionality of notifying any change like 2-way databinding..
It would be great to implement it as List - Details screen in conjunction with datagrid or listview, it would be also useful for custom modals, and used in templates like custom modal template (for datagrid in example):
- from selected record in datagrid / listview (or anything) you take selected object and pass it as 2-way binding to the new form control..
- any change into the form is validated similar to datagrid..
- new form control notifies bound object (like selected row) that data has been changed..
- from there you could choose to save / update data in the grid, and / or call ajax and perform the save / update on your own..
I have attached image for hypotetichal list-details view (page)..
Currently we are trying to implement something similar with ajax partial views which are loaded into the div on grid selected record event.. This have it's own issues (have separated incident about the subject) and I beliieve that form control here would be great improvement for any scenario..