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

Not selecting default value since 2015 update

2 Answers 50 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 25 Mar 2015, 07:54 PM
Hi,

Since we've updated to the 2015 Q1 update a number of our DropDownLists have stopped selecting the top item on page load.  This is the issue we're having, seems to be consistent with the following criteria:

-DropDownListFor a default int property (so value is 0 by default)
-DataSource is a small collection contained in the ViewBag with no item of ID 0

eg
@(Html.Kendo().DropDownListFor(x => x.ClientID)
                            .DataTextField("name")
                            .DataValueField("id")
                            .BindTo((System.Collections.IEnumerable)ViewBag.Clients)
                        )

These were working before the update, and just defaulting to an index of 1, but even trying to set the SelectedIndex property fails to alleviate the problem.   Any advice you might have would be much appreciated.

Thanks,
Kevin











2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 25 Mar 2015, 08:49 PM
Here is a demo of the behaviour I'm talking about (the cap color list).

http://dojo.telerik.com/umomU
0
Accepted
Georgi Krustev
Telerik team
answered on 27 Mar 2015, 11:03 AM
Hello Kevin,

The described issue is related to some changes made in Q1 2015 release due the virtualization and grouping features. It is already addressed (screencast) and the next internal build scheduled for today (Friday) will include the fix. Let me know if the problem still persists after the update.

Regards,
Georgi Krustev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
DropDownList
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or