Skip to main content

ejListBox

Namespace: Wisej.Web.Ext.Syncfusion

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

The ListBox control provides a list of options for users to select from. It is capable of including other HTML elements such as images, text boxes, check boxes, and radio buttons and so on. It also supports data binding, template options and multi-select options.

public class ejListBox : ejBase

Constructors​

Instance member ejListBox()​

Constructs a new instance of the ejListBox class.

Example:

The following example creates the list box and binds it to a list through the options.

var listBox = new ejListBox();
listBox.Options.dataSource = countries;
listBox.Options.fields = new { text = "Name", value = "Code" };
listBox.Size = new Size(250, 300);
this.Controls.Add(listBox);

Instance member ejListBox(options)​

Constructs a new instance of the ejListBox class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a list box with check boxes and shows the item selected by the user.

var listBox = new ejListBox(new
{
dataSource = countries,
fields = new { text = "Name", value = "Code" },
showCheckbox = true
});
listBox.Instance.onSelect += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Selected: {e.Data.text}");
});
this.Controls.Add(listBox);

Implements​