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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid with OData 2-way binding

Thread ID:

Created:

Updated:

Platform:

Replies:

117339 Sep 30,2014 03:47 PM UTC Oct 3,2014 12:24 PM UTC ASP.NET MVC 4
loading
Tags: Grid
CS
Asked On September 30, 2014 03:47 PM UTC

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()) _
    .ToolbarSettings(
        Sub(toolbar)
                toolbar.ShowToolbar().ToolbarItems( _
                    Sub(items)
                            items.AddTool(ToolBarItems.Add)
                            items.AddTool(ToolBarItems.Edit)
                            items.AddTool(ToolBarItems.Delete)
                            items.AddTool(ToolBarItems.Update)
                            items.AddTool(ToolBarItems.Cancel)
                    End Sub)
        End Sub) _
    .AllowPaging() _
    .PageSettings(Function(page) page.PageSize(10)) _
    .Columns( _
        Sub(col)
                col.Field("Id").HeaderText("Id").IsPrimaryKey(True).IsIdentity(True).TextAlign(TextAlign.Right).Width(10).Add()
                col.Field("Company_PKey").HeaderText("Company").ForeignKeyField("Id").ForeignKeyValue("Descrp").DataSource(ViewBag.listOfCompany).Add()
                col.Field("Code").HeaderText("Code").Width(20).ValidationRules( _
                    Sub(v)
                            v.AddRule("required", True).AddRule("number", True)
                    End Sub
                    ).Add()
                col.Field("Descrp").HeaderText("Description").TextAlign(TextAlign.Right).Width(50).Add()
        End Sub
    ) _
    .ClientSideEvents( _
        Sub(eve)
                eve.Load("gridLoad").ActionComplete("CompleteHandler").ActionBegin("BeginHandler")
                eve.EndAdd("EndAdd")
        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?



Ragavee U S [Syncfusion]
Replied On 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.

 

Regards

Ragavee U S


CS
Replied On 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
Replied On 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

Alan Sangeeth S [Syncfusion]
Replied On 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.

Regards,
Alan Sangeeth S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;