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