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
close icon

MVC Grid edit problem with PrimaryKey and datasource


We are using version of MVC Grid and we have a MVC like the example:



            .EditSettings(edit =>





            .ToolbarSettings(toolbar =>


                toolbar.ShowToolbar().ToolbarItems(items =>









            .AllowPaging(true).PageSettings(page => page.PageSize(15))

            .AllowFiltering(true).FilterSettings(filter => { filter.FilterType(FilterType.Menu); })


            .Columns(col =>


                col.Field("ID_COUNTRY").HeaderText("Country").IsPrimaryKey(true).TextAlign(TextAlign.Left).ForeignKeyField("ID").ForeignKeyValue("DESCRIPTION").DataSource((IEnumerable<object>)ViewBag.CountriesDS).Width(90).ValidationRules(v => v.AddRule("required", true)).Add();


col.Field("ID_TYPE").HeaderText("Type").IsPrimaryKey(true).DefaultValue(0).ValidationRules(v => v.AddRule("required", true)).Add();


col.Field("UCI_FIELD").HeaderText("UCI").Width(100).TextAlign(TextAlign.Left).ValidationRules(v => v.AddRule("required", true)).Add();



            .ClientSideEvents(eve =>










But when we edit grid, an error appears;


TypeError: u.find(...).get(...) is undefined




It seems, that the problem is with the PrimaryKey field, that is showed with a DataSource combo.

3 Replies

GV Gowthami V Syncfusion Team May 7, 2015 09:06 AM UTC

Hi Juan,

Thanks for using Syncfusion products.

We considered the issue “Script error throws while editing the row when enable primarykey and foreignkey for the same column” as a bug. We have logged a report on this and will fix the issue internally, also the fix will be included in Vol 1, 2015 service pack 2 release, which has been scheduled to be rolled out at the end of month May 2015.

We have also created an incident internally to have a follow up with this issue.

Please let us know if you have any other concerns.

Gowthami V.

JP Juan Peiró Llobet May 7, 2015 01:14 PM UTC


Hi Gowthami

Thank you very much for your atencion and your help

Best regards

GV Gowthami V Syncfusion Team May 8, 2015 04:52 AM UTC

Hi Juan,

Thanks for your update.

Please get back to us if you need further assistance. We will happy to assist you.

Gowthami V.

Live Chat Icon For mobile
Up arrow icon