Hi,
When the saveChanges event is fired and the UpdateUrl of my grid is aclled, the data is posted using application/x-www-form-urlencoded instead of application/json
Thus, the ModelBinder with JSOn cannot Workd properly.
Moreover, the date is posted with the format /Date(1398988800000)/ so when I deserialize the response it fails whend trying to convert as dateTime.
/Date
(1398988800000)/
Any idea ?
Thanks
Hello PEO-Stokomani,
You can still use Infragistics.Web.Mvc.GridModel.LoadTransactions<T> method to do the heavy lifting in your model binder.
Here is an example code:
Remember that in your controller method you need to return JsonResult with the correct Data.Success=true property so that the igGrid can commit the transaction on the client side.
Hope this helps,Martin PavlovInfragistics, Inc.
Hello,
Thanks for the answer. In our case we use the direct submitting to the updateUrl when rowEditEnding event is trigerred.
The controller's method pointed by the updaetUrl awaits the model used in the grid as parameter.
Thus I need a generic model binder to deserialize the ig_transactions object (with only 1 row because we have edit 1 lien at the time)
Here is a sampel of our modelBinder (all grid models are annotated with it in order to corrctly convert the transactions):
igGrid uses transaction objects on the client to persist user changes. This transaction objects have a corresponding model class (Infragistics.Web.Mvc.Transaction<T>) in the Infragistics.Web.Mvc.dll which we use to deserialize the data sent from the grid by using another method Infragistics.Web.Mvc.GridModel.LoadTransactions<T> from the library. This solution doesn't use the ASP.NET MVC ModelBinder.
Here is an example code on how to implement this solution (the code was taken from the Basic Editing sample):