Unplanned
Last Updated: 01 Oct 2025 07:31 by ADMIN

When binding a dropdown to a list (with .BindTo()) instead of a DataSource, none of the object's properties besides "Text" and "Value" are available in the Template, and will throw a ReferenceError that the property is not defined.

But this only occurs if the list of items it is bound to is of the type SelectListItem, or inherits from that type.

If the list is of items that do not inherit from SelectListItem, then all properties can be used in the Template with no error.

Screenshot of example project output:

Explanation:

Each dropdown on the page has a .Template() which simply displays the "Text" property and one other property (listed in each section's heading). Example: 

"#= Text # - #= Disabled #"

If the property is not working correctly, a unhandled ReferenceError will occur and the dropdown will fail to initialize. These failed rows are highlighted red.

This only occurs when the dropdowns use .BindTo() and a list of either SelectListItems or of a class that inherits from SelectListItem. The dropdowns bound to lists of CustomSelectListItem, which does not inherit, have no issue with the additional properties.

 

This bug has been occurring since at least 2021.3.1109, but I confirmed is still present in the latest version.

Unplanned
Last Updated: 29 Jan 2024 11:12 by Sarah

Bug report

The DropDownList is incorrectly marked as invalid, when another field of the model is invalid.

Reproduction of the problem

Sample project attached.
MVCFormValidation.zip

  1. Run the project
  2. Click the submit button. It submits the form and in the submit action a model error is added to a specific field of the model: ModelState.AddModelError("NumberOfShares", "Number not in the expected range");

Current behavior

Two validation errors appear after the form submission: one for the NumberOfShares field and a second one for the Country.Id field, for which a DropDownList editor is used.

Expected/desired behavior

A validation error appears only for the NumberOfShares field.
Note that if no editor is specified for the Country.Id field (instead of using a DropDownList editor), e.g.,

	i.Add()
	    .Field(f => f.Country.Id)
	    .Label(l => l.Text("Country"));

no validation error message is shown for Country.Id.

Environment

  • Kendo UI version: 2023.3.1114
  • jQuery version: x.y
  • Browser: [all]
Unplanned
Last Updated: 21 Nov 2023 06:55 by Novak
Created by: Novak
Comments: 0
Category: DropDownList
Type: Feature Request
2
Currently, sorting the items in the dropdowns (DropDownList, ComboBox) with Grouping enabled requires using AJAX binding and ServerGrouping(true). It would be nice if support for sorting on the client is implemented, for scenarios that involve local data binding (e.g. when the dropdown is bound using the BindTo method).
Unplanned
Last Updated: 25 Jul 2019 13:11 by Sam

Bug report

Class k-state-focused is not removed from DropDownlist on blur, if its filter input was clicked.

Reproduction of the problem

  1. Use Events demo
  2. Click on DropDownList to expand its dropdown.
  3. Click on DropDownList's filter input.
  4. Click on demo's title to blur the DropDownList

Current behavior

DropDownList appears focused as k-state-focus class is not removed from its span
<span unselectable="on" class="k-dropdown-wrap k-state-default k-state-focused">
image

Expected/desired behavior

DropDownList does not appear focused.

Environment

  • Kendo UI version: 2019.2.619
  • Browser: all