Combobox Default Value Selection

1 Answer 5137 Views
General Discussions
alex51482
Top achievements
Rank 2
alex51482 asked on 11 Sep 2018, 09:51 PM

How do I imperatively set the default selected value of a kendo angular combobox?

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 13 Sep 2018, 09:37 AM
Hello Alex,

Depending on the scenario and the type of data and value binding the approach may vary, but typically binding the value property of the ComboBox will set the selected item accordingly. You can provide the value either in the markup configuration or bind it to a component class field, e.g.:

https://stackblitz.com/edit/angular-ywxcy9?file=app/app.component.ts

Note that the initial value should either be present in the data collection the component is bound to, or allowCustom should be set to true.

Further details about the ComboBox data and value binding are available in the following sections of our documentation:

https://www.telerik.com/kendo-angular-ui/components/dropdowns/combobox/data-binding/

https://www.telerik.com/kendo-angular-ui/components/dropdowns/combobox/value-binding/

I hope this helps, but if I am missing something, please describe the scenario and the desired functionality in further details, so I can try providing a solution that is more suitable to the specific use case. Thank you in advance.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
alex51482
Top achievements
Rank 2
commented on 13 Sep 2018, 05:16 PM

Good deal thank you Dimiter!
Tags
General Discussions
Asked by
alex51482
Top achievements
Rank 2
Answers by
Dimiter Topalov
Telerik team
Share this question
or