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 Edit Foreign Key Column with Remote data using Angular

Hello,

I am trying to use the Foreign Key feature of the grid to be able to edit a country list using a dropdown. Strangely, it works using local dat but not using remote data?

{field: "CountryCode", headerText: "CountryCode", dataSource: $scope.ListCountry, foreignKeyField: "value", foreignKeyValue: "text"}

$scope.ListCountry = [{ text: "Country 1", value: 0 }, { text: "Country 2", value: 1 }, { text: "Country 3", value: 2 }]; -> WORKS

$scope.ListCountry = ej.DataManager({ url: "/api/GetListCountry", adaptor: new ej.UrlAdaptor() }); -> DOES NOT WORKS


This is what "/api/GetListCountry" return:

[{"value":0,"text":"Andorre"},{"value":1,"text":"Émirats Arabes Unis"},{"value":2,"text":"Afghanistan"},{"value":3,"text":"Antigua-et-Barbuda"},{"value":4,"text":"Anguilla"}.....]


Thank you,

Yann


3 Replies

PK Prasanna Kumar Viswanathan Syncfusion Team February 22, 2016 09:45 AM UTC

Hi Yann,

Thanks for contacting Syncfusion support.

We checked your code example and suspect that you need “URL adaptor within the columns.” Do you want to bind URL DataSource for a specific column? Could you please confirm if it is your requirement?

Regards,

Prasanna Kumar N.S.V



YB Yann Bruneau March 1, 2016 01:08 PM UTC

Hi,

Sorry I was in holiday.

Yes, I need the column Country to be bound to a remote country list when in Edit Mode. I am able to make it works with a local countrylist but not with a Remote one.

Thank you,

yann


PK Prasanna Kumar Viswanathan Syncfusion Team March 2, 2016 09:57 AM UTC

Hi Yann,

We would like to let you know that we have already logged feature request for “Url dataSource for foreign key columnsand have added your requirements to the description of the feature. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents 


Regards,

Prasanna Kumar N.S.V


Loader.
Up arrow icon