Skip to main content

ListBox

Namespace: Wisej.Web.Ext.Syncfusion2

Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)

The ListBox is a graphical user interface component used to display a list of items. Users can select one or more items in the list using a checkbox or by keyboard selection. It supports sorting, grouping, reordering and drag and drop of items.

public class ListBox : ej2Base

Constructors​

Instance member ListBox()​

Constructs a new instance of the ListBox class.

Example:

The following example creates a list box and fills it through the Options object.

var listBox = new ListBox();
listBox.Options.dataSource = new[] { "Espresso", "Cappuccino", "Latte", "Americano" };
this.Controls.Add(listBox);

Instance member ListBox(options)​

Constructs a new instance of the ListBox class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a list box bound to a list of objects that allows the user to select multiple items using check boxes.

var listBox = new ListBox(new
{
fields = new { text = "name", value = "id" },
selectionSettings = new { mode = "Multiple", showCheckbox = true },
dataSource = new[]
{
new { id = 1, name = "Reading" },
new { id = 2, name = "Cycling" },
new { id = 3, name = "Cooking" }
}
});
this.Controls.Add(listBox);

Implements​