datasource with filter no item selected after databound

3 posts, 0 answers
  1. iDoklad
    iDoklad avatar
    15 posts
    Member since:
    Jun 2012

    Posted 27 Nov Link to this post

    I have a dropdownlist with remote data binding. I set up a filter on the datasource before the data is fully loaded. After data is bound to the datasource, I see my items in the list with first item selected. After upgrading kendo from 2015.1.408 to a 2017 version no item is selected after data is bound to the datastource. Is there a way to preserve the old behavior?

    Example here: http://dojo.telerik.com/ItiLU Just change library to any 2017 version and the behavior changes too.

    Note that I don't want to simply select the first item from the list, but my application uses Kendo MVC to choose value based on a field from the model of the view.

     

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1332 posts

    Posted 29 Nov Link to this post

    Hello,

    In the recent Kendo UI versions filtering can be applied either as configuration of the dataSource (see this example), or in the DropDownList's dataBound event (example).

    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. iDoklad
    iDoklad avatar
    15 posts
    Member since:
    Jun 2012

    Posted 01 Dec in reply to Ivan Danchev Link to this post

    Databound evenet works just fine. Having to set a variable to prevent recursion calls of the databound event is necessary but not very pretty.

    Thank you.

Back to Top