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

Grid with OData 2-way binding

I have my grid as such (partial code):

@(Html.EJ().Grid(Of Office)("OfficeGrid") _
            .AllowResizeToFit(True) _
    .Datasource("/OData/Office") _
    .EditSettings(Function(edit) edit.AllowAdding().AllowDeleting().AllowEditing()) _
                toolbar.ShowToolbar().ToolbarItems( _
                    End Sub)
        End Sub) _
    .AllowPaging() _
    .PageSettings(Function(page) page.PageSize(10)) _
    .Columns( _
                col.Field("Code").HeaderText("Code").Width(20).ValidationRules( _
                            v.AddRule("required", True).AddRule("number", True)
                    End Sub
        End Sub
    ) _
    .ClientSideEvents( _
        End Sub

When I edit the foreign key column, the data that was sent to the server was:
  1. Code"office2"
  2. Company_PKey"2"
  3. Company_PKey_input"Company Name"
  4. Descrp"Office Two"
  5. Id2
  6. OfficeGridCompany_PKey2

I don't want the Company_PKey_input and the OfficeGridCompany_PKey in the request, it is making my delta becoming null upon submission.

Anyway that I can fix this?

4 Replies

RU Ragavee U S Syncfusion Team October 1, 2014 03:02 PM UTC

Hi Chen Choong Seng


Thanks for your interest in Syncfusion products.


We have analyzed the reported query and we are sorry to let you know that we are not able to reproduce the issue mentioned.


Based on your information, we have created a simple sample and the same can be downloaded from the below location.


Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/Sample78883895.zip


Please reproduce the issue in the above sample and provide us the replication procedure for the same. The provided information will be helpful for us to analyze the issue and provide response as early as possible.


Please let us know if you have any queries.



Ragavee U S

CS CS October 1, 2014 04:05 PM UTC

Tested your example, it works well, the difference that I've observed:
1. I'm using 12.2450.0.39, and the sample is using 12.2400.0.36
2. The dropdownlist field in the sample, its primary and foreign key column is of the same name "EmployeeID".

Wonder if it makes a difference, I'm trying to replicate in your example, but went into some other nuget problem :-(

CS CS October 3, 2014 04:08 AM UTC

Hi Ragavee,

I've managed to replicate the issue, the issue lies in the Syncfusion's javascript, the version that you've provided in the sample differs from the version that I've got from Syncfusion nuget.

Please find the issue replicated in the attached file.

Thank you.

Attachment: Wrapper_WepAPI_Replicate_20141003_4a1b7694.rar

AS Alan Sangeeth S Syncfusion Team October 3, 2014 12:24 PM UTC

Hi Chen,


We are sorry for the inconvenience caused.


We are able to reproduce the issue “Invalid fields are passing to server-side” in our end and we have logged defect report for this. The fix for this issue will be included in Volume 3, 2014 Service Pack 1 release.


Please let us know if you have any queries.

Alan Sangeeth S

Live Chat Icon For mobile
Up arrow icon