Completed
Last Updated: 14 Sep 2021 07:41 by ADMIN
Dan
Created on: 09 Jul 2019 13:31
Category: ComboBox
Type: Bug Report
0
ComboBoxFor helper with Name set does not throw exception when used as Grid editor

Bug report

In Core when the ComboBoxFor helper is used as an editor in a Grid (Shared/EditorTemplates) and its Name is set, the Grid does not render and no exception is displayed, to indicate that the Name option should not be set.

Reproduction of the problem

Reproducible in the Editing custom editor Grid demo.

  1. Set the ComboBox' Name in the ClientCategory.cshtml template
@(Html.Kendo().ComboBoxFor(m => m)
    .Name("CategoryID")
    .DataValueField("CategoryID")
    .DataTextField("CategoryName")
    .BindTo((System.Collections.IEnumerable)ViewData["categories"])
)

Current behavior

We throw an exception when the Name is set (e.g. if the ComboBox is used outside of a Grid), but in this scenario it is not displayed.

Expected/desired behavior

An exception is thrown and its message is displayed.

Environment

  • Kendo UI version: 2019.2.619
  • jQuery version: x.y
  • Browser: [all]
0 comments