dxList
Namespace: Wisej.Web.Ext.DevExtreme
Assembly: Wisej.Web.Ext.DevExtreme (4.1.0.0)
The List is a widget that represents a collection of items in a scrollable list.
- C#
- VB.NET
public class dxList : dxBase
Public Class dxList
Inherits dxBase
Constructors
dxList()
Constructs a new instance of the dxList class.
Example:
The following example creates a list of mail folders and shows the item clicked by the user.
var list = new dxList();
list.Options.dataSource = new[] { "Inbox", "Sent", "Drafts", "Trash" };
list.Options.selectionMode = "single";
list.Instance.onItemClick += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Folder: {e.Data.itemData}");
});
list.Dock = DockStyle.Left;
this.Controls.Add(list);
dxList(options)
Constructs a new instance of the dxList class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a searchable list of products with check boxes for multiple selection.
var list = new dxList(new
{
dataSource = new[]
{
new { id = 1, name = "HD Video Player" },
new { id = 2, name = "SuperHD Video Player" },
new { id = 3, name = "SuperPlasma 50" }
},
keyExpr = "id",
displayExpr = "name",
searchEnabled = true,
searchExpr = "name",
selectionMode = "multiple",
showSelectionControls = true
});
list.Dock = DockStyle.Left;
this.Controls.Add(list);