Hi
Alexis,
Greetings
from Syncfusion Support.
We
have reviewed your query regarding adding custom dataSource to the edit form
dropdown when using the foriegnKey Column in the grid. To achieve this, we
recommend utilizing the column.edit property in conjunction with the editParams
configuration. This allows you to define a custom dataset for the dropdown
editor used during editing. We’ve covered this approach in detail in our
documentation, which you can refer to here:
Documentation:
https://helpej2.syncfusion.com/vue/documentation/grid/editing/edit-types?cs-save-lang=1&cs-lang=html#provide-custom-data-source-for-dropdownlist-component
The
code snippet and the sample has been attached for your reference.
|
<e-column
field="ShipCountry"
headerText="Ship Country"
width="150"
:edit="dropDownParams"
editType="dropdownedit"
:dataSource="paises"
:validationRules="countryRules"
/>
dropDownParams: {
params: {
dataSource: [
{ countryName: 'United States' },
{ countryName: 'Australia' },
{ countryName: 'India' },
{ countryName: 'Portugal' },
{ countryName: 'Brazil' },
],
fields: { text: 'countryName', value: 'countryName' },
query: new Query(),
actionComplete: () => false,
},
},
|
Sample: https://stackblitz.com/edit/hq9pmht5-eiovtqqo?file=src%2FApp.vue
Please
get back to us for further assistance.
Regards,
Dineshnarasimman
M