Any idea why the blow code will throw error "ERROR Error: Expected initial value of type Object. See http://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdownlist/#toc-value-selection" ??? If I remove the
<kendo-dropdownlist [data]="someList"
[textField]="'text'"
[valueField]="'value'"
formControlName="someFormControlName">
</kendo-dropdownlist>
This work fine.
<kendo-dropdownlist [data]="someList"
[textField]="'text'"
[valueField]="'value'">
</kendo-dropdownlist>
So, how do I get the dropdown list to play well in formGroup ?
Thanks,
Bryian Tan
Hi Bryian,
Thank you for the provided code snippet.
Please try setting the valuePrimitive option to true as the following article demonstrates:
https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdownlist/value-binding/#toc-primitive-values-from-object-fields
and then follow the instructions from this page:
https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdownlist/forms/#toc-reactive-forms
I hope this helps.
Regards,
Martin Bechev
Progress Telerik