Set Initial Value On ComboBox using ServerFiltering

2 posts, 0 answers
  1. Grant
    Grant avatar
    83 posts
    Member since:
    Jul 2016

    Posted 24 Jul Link to this post

    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

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1268 posts

    Posted 26 Jul Link to this post

    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.
Back to Top