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

datasource with filter no item selected after databound

2 Answers 354 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
iDoklad
Top achievements
Rank 1
iDoklad asked on 27 Nov 2017, 02:29 PM

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 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 29 Nov 2017, 02:23 PM
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.
0
iDoklad
Top achievements
Rank 1
answered on 01 Dec 2017, 02:24 PM

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.

Tags
DropDownList
Asked by
iDoklad
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
iDoklad
Top achievements
Rank 1
Share this question
or