For what ever reason, the data is not binding from the grid to the post events.
The actions are being called. the data is blank. (I have added a parameterless constructor to see if that helped)
However, data is being sent from the client. So my guess is it is to do with binding.
I was copying the demo here:
https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/FormEditing/Mvc/Light/
Except I am using a controller rather than API Controller.
So on delete :
sending FormData: key:
73
method returns internal error, parameterless constructor doesnt exist. With added constructor, form/key is empty.
C#[HttpDelete]
public void ConditionsDelete( FormDataCollection form)
{
var rec_no = Convert.ToInt32(form.Get("key"));
}
My grid is using
C#.DataSource(d => d.Mvc().Controller("Settings")
.LoadAction("ConditionsList")
.UpdateAction("ConditionsUpdate")
.InsertAction("ConditionsAdd")
.DeleteAction("ConditionsDelete")
.Key("rec_no")
)
Is there something extra i need to do? It all seems like it should be working
Switching to API controller seems to have fixed the binding issue, though not sure why, you have the d.Mvc() option.
It is probably better going forward swapping to API controller anyway. But my main grid i have to use controller as it requires session data.
Fortunately i dont require to add/save/delete from the main grid. But curious incase it comes up, how to get it working on a controller.