or

I have a Master Grid/Detail Grid both containing information that compose a record of "Movements".
The problem comes when I need to add a new record because the primary key of the record is part on the Master "Header" Row and part on the Detail Row.
Changing the functionality of the Detail Row onSave() and taking the values of the Master row (that can't be saved yet) seems like an odd approach.
Thanks in advanced,
D.
{ "odata.metadata":"http://localhost:61534/api/$metadata#AssetList/@Element", "ID":17, "ManufacturerName":"TEST", "Name":"TEST", "SerialNumber":"TEST", "AssetStateID":1, "AssetStateName":"TEST", "NextCalibration":"2013-07-11T09:08:28.298Z"}public override HttpResponseMessage Post(AssetListViewModel item){ // #### MG: CREATE ASSET RSAMS.WebUI.Models.Asset asset = new Asset(); asset.Manufacturer = item.ManufacturerName; asset.Name = item.Name; asset.SerialNumber = item.SerialNumber; asset.AssetStateID = 1; // IN USE asset.NextCalibration = item.NextCalibration; db.Asset.Add(asset); db.SaveChanges(); // #### MG: RESPONSE item.ID = asset.ID; item.AssetStateID = asset.AssetStateID; var response = Request.CreateResponse<AssetListViewModel>(HttpStatusCode.Created, item); response.Headers.Location = new Uri(Url.Link("OData", new { id = item.ID })); return response;}$("#grid").kendoGrid({ toolbar: ["create"], editable: "popup", sortable: true, filterable: false, groupable: false, scrollable: false, resizable: false, pageable: { pageSizes: [10, 25, 50, 200, 1000] }, dataSource: { type: "odata", pageSize: 25, serverSorting: true, serverPaging: true, transport: { create: { url: "/api/AssetList", dataType: "json" }, read: { url: "/api/AssetList", dataType: "json" }, update: { url: "/api/AssetList", dataType: "json" }, destroy: { url: function (data) { return "/api/AssetList([RW-PARAM])".replace("[RW-PARAM]", data.ID); }, dataType: "json" } }, schema: { data: function (data) { return data.value; }, total: function (data) { return data["odata.count"]; }, model: { id: "ID", fields: { ID: { type: "number", editable: false, nullable: false }, ManufacturerName: { validation: { required: false } }, Name: { validation: { required: true } }, SerialNumber: { validation: { required: true } }, AssetStateName: { nullable: false, validation: { required: true } }, NextCalibration: { type: "date" } } } }, change: function (e) { //console.log("CHANGE HERE"); } }, columns: [ { field: "CheckBox", width: 34, title: " ", sortable: false, template: "<input type=\"checkbox\" id=\"#= ID #\" class=\"checkbox-item\" />", headerTemplate: "<input type=\"checkbox\" id=\"grid-checkbox-select-all\" />" }, { field: "ID", width: 60, title: "ID", template: "<a href=\"javascript:\">#= ID #</a>" }, { field: "ManufacturerName", width: 150, title: "Manufacturer" }, { field: "Name", //width: 100, title: "Name" }, { field: "SerialNumber", width: 115, title: "Serial Number" }, { field: "AssetStateName", width: 90, title: "State" }, { field: "NextCalibration", width: 85, title: "Next Cal.", format: "{0:yyyy-MM-dd}" }, { width: 230, title: " ", sortable: false, command: [ { text: "Details", click: app.grid.showItemDetails }, { text: "Edit", click: app.grid.editItem }, { name: "destroy", text: "Delete", click: app.grid.deleteItem } ] } ], edit: function (e) { e.container.find("label[for=CheckBox]").parent().hide().next().hide(); e.container.find("label[for=ID]").parent().hide().next().hide(); }});