Hi,
How I can insert a blank row in a DropDownList
controller :
View :
How I can insert a blank row in a DropDownList
controller :
ViewBag.NoSource = new SelectList(db.Sources, "NoSource", "CodeSource");
View :
@(Html.Kendo().DropDownList()
.Name("NoRisque") // Name of the widget should be the same as the name of the property
.DataValueField("Value") // The value of the dropdown is taken from the EmployeeID property
.DataTextField("Text") // The text of the items is taken from the EmployeeName property
.BindTo((SelectList)ViewBag.NoSource) // A list of all employees which is populated in the controller
)