kendoDropDownList
Namespace: Wisej.Web.Ext.Kendo
Assembly: Wisej.Web.Ext.Kendo (4.1.0.0)
The DropDownList displays a list of values and allows for a single selection from the list.
- C#
- VB.NET
public class kendoDropDownList : kendoBase
Public Class kendoDropDownList
Inherits kendoBase
Constructors
kendoDropDownList()
Constructs a new instance of the kendoDropDownList class.
Example:
The following example creates a drop-down list and fills it through the Options property.
var list = new kendoDropDownList();
list.Options.dataSource = new[] { "Small", "Medium", "Large" };
list.Options.index = 1;
list.Width = 200;
this.Controls.Add(list);
kendoDropDownList(options)
Constructs a new instance of the kendoDropDownList class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a drop-down list bound to a list of objects, with separate text and value fields.
var list = new kendoDropDownList(new
{
dataTextField = "name",
dataValueField = "id",
optionLabel = "Select a category...",
dataSource = new[]
{
new { id = 1, name = "Beverages" },
new { id = 2, name = "Condiments" },
new { id = 3, name = "Seafood" }
}
});
list.Width = 250;
this.Controls.Add(list);