When using inline editing in the Grid, all entries are added again for each new row I add. I've tracked this down and it seems to be caused by not returning the inserted row to the Grid, which is why the ID stays 0 and every row is treated as a new row each time.
I've tried to solve this, but even using the example from the docs, I can't get it to work.
My grid uses this WebAPI call to insert a row. How should I change it to return the row correctly, including the ID?
I've tried to solve this, but even using the example from the docs, I can't get it to work.
My grid uses this WebAPI call to insert a row. How should I change it to return the row correctly, including the ID?
public HttpResponseMessage Post(Batch model){ HttpResponseMessage response; if (ModelState.IsValid) { service.Create(model.ReceiptLineURID, model); DataSourceResult result = new DataSourceResult { Data = new[] { model }, Total = 1 }; response = Request.CreateResponse(HttpStatusCode.Created, result); response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = model.BatchNo })); } else { response = Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState); } return response;}