ListView
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.
- C#
- VB.NET
public class ListView : ej2Base
Public Class ListView
Inherits ej2Base
Constructors
ListView()
Constructs a new instance of the ListView class.
Example:
The following example creates a list view with a header and fills it through the Options object.
var listView = new ListView();
listView.Options.headerTitle = "Contacts";
listView.Options.showHeader = true;
listView.Options.dataSource = new[] { "Nancy Davolio", "Andrew Fuller", "Janet Leverling" };
this.Controls.Add(listView);
ListView(options)
Constructs a new instance of the ListView class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a list view bound to a list of objects and groups the items by department.
var listView = new ListView(new
{
headerTitle = "Team",
showHeader = true,
fields = new { id = "id", text = "name", groupBy = "department" },
dataSource = new[]
{
new { id = "1", name = "Nancy Davolio", department = "Sales" },
new { id = "2", name = "Andrew Fuller", department = "Sales" },
new { id = "3", name = "Janet Leverling", department = "Support" }
}
});
this.Controls.Add(listView);