This is a migrated thread and some comments may be shown as answers.

Set Initial Value On ComboBox using ServerFiltering

1 Answer 499 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 24 Jul 2017, 02:12 PM

Hi, 

As my title suggests, Im trying to set the initial value of a comboboxthat uses Server Filtering.

A perfect example is your own Server Filter Demo (http://demos.telerik.com/kendo-ui/combobox/serverfiltering). Using this as an example, Im trying to have product 'Chai' (ProductID: 1) pre-selected before the user starts interacting with the widget.

Do you have any suggestions?

Thanks and kind Regards, 
Grant

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 26 Jul 2017, 08:51 AM
Hello Grant,

In the linked demo the ComboBox' autoBind option is set to false. Thus on initialization it is not bound, i.e. its data source does not contain items, therefore there is nothing to pre-select. You can however call the widget's value method, which, if the ComboBox is not bound, will fetch the data and set the value. Dojo example.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ComboBox
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or