We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error saving with Odata v4

I'm using a DataGrid bind with OData v4, and I created a custom dialog template to edit the row data.
I want to use ejCheckbox instead of standard checkboxes, but I'm having an error during post data to web api odata controller, it returns this error:

+  Exception "!5dLt3!The property 'IsAdUser_hidden' does not exist on type 'THEasy.Model.User'. Make sure to only use property names that are defined by the type. Ploc Ploc Plo!" System.Exception {Microsoft.OData.Core.ODataException}

How can I resolve ?

In the attachment I included my webapi controller (UsersController), the view with the datagrid and template (Index.cshtml) and my data model class (User.cs).
I also included a screenshot with the wrong property name passed to the server 'IsAdUser_hidden'.


Attachment: syncfusion_6ccf9833.zip

1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team July 19, 2016 12:23 PM UTC

Hi Andrea, 

We are able to reproduce the problem at our end. On using ejCheckBox control in the dialog editor template, wrapper element will be generated along with the original ejCheckBox which generates the IsAdUser_hidden value and it causes the problem while saving the data in server. To avoid problem, delete the corresponding key in the actionBegin event of the Grid. 

            dataSource: new ej.DataManager({ 
                url: "/Odata/Orders", adaptor: new ej.ODataV4Adaptor() 
             . . . ..  
            actionBegin: function (args) { 
                if (args.requestType == "save") { 
                    delete args.data["IsAdUser_hidden"] 

Seeni Sakthi Kumar S. 

Live Chat Icon For mobile
Up arrow icon