I have a razorpage with a grid and these methods on the DataSource.
.Update(u => u.Url("/Audit?handler=Update").Data("forgeryToken"))
.Create(c => c.Url("/Audit?handler=Create").Data("forgeryToken"))
.Destroy(d => d.Url("/Audit?handler=Destroy").Data("forgeryToken"))
For some reason when I edit a row, then hit update, I get a 400 error as the request is being made for Audit?handler=Create instead of the Update handler?
What can I check?
My Update handler
public JsonResult OnPostUpdate([DataSourceRequest] DataSourceRequest request, ViewLineItemModel localOrder)
{
// get updated order from parameter
// save updates to db
//....
// test
JsonResult r = new JsonResult(localOrder);
return r;
}