Hi Jose,
Greetings from Syncfusion Support.
We have validated your requirement. Yes, we can update dropDownlist value through reactive form setValue method.
Code example:
App.component.html
<ejs-dropdownlist formControlName="skillname" name="skillname" [dataSource]='autoreactiveskillset'
[placeholder]='autoreactiveplaceholder'>
</ejs-dropdownlist>
<button style="float:right" type="button" (click)="setDefaultValue()">Set Value</button>
|
app.component.ts
public autoreactiveskillset: string[] = [
'ASP.NET', 'ActionScript', 'Basic',
'C++', 'C#', 'dBase', 'Delphi',
'ESPOL', 'F#', 'FoxPro', 'Java',
'J#', 'Lisp', 'Logo', 'PHP'
];
setDefaultValue() {
this.userForm.setValue({ name: 'John', skillname: 'Delphi', age: 20 });
} |
We have prepared a sample to update dropdown list value using button click. Please get it from below link,
Also, we would like to inform you that the DropDown List will accept only accept already present in referred data source.
Kindly let us know if you need further assistance on this.
Regards,
Narayanasamy P.