# ListView

The **Wisej.Web.ListView** is a control used to display a list of items through one of four predefined views.

![](https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2F5JvJco1s6xwHQ6iErPqk%2Fimage.png?alt=media\&token=2a7cff6d-bbfe-44f3-ac78-77d4cf20b668)

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation](https://docs.wisej.com/api/wisej.web/lists-and-grids/listview).
{% endhint %}

## Features

### Data Binding

Data binding is fully supported, including formatting and conversion of the value, through the default [data binding](https://docs.wisej.com/docs/controls/general/data-binding) infrastructure.

### Virtual Mode

Setting the **VirtualMode** property to `true` puts the ListView into virtual mode. In Virtual mode, the normal Items collection is unused. Instead, items are created dynamically as the ListView requires them.

Virtual mode can be useful under many circumstances. If a ListView object must be populated from a very large collection already in memory, creating a ListViewItem object for each entry can be wasteful. In virtual mode, only the items required are created. In other cases, the values of the ListViewItem objects may need to be recalculated frequently, and doing this for the whole collection would produce unacceptable performance. In virtual mode, only the required items are calculated.

In order to use virtual mode, you must handle the RetrieveVirtualItem event, which is raised every time the ListView requires an item. This event handler should create the ListViewItem object that belongs at the specified index. In addition, the VirtualListSize property must be set to the size of the virtual list.

### Views

The ListView control contains four main views for displaying list items: `LargeIcon`, `SmallIcon`, `Details`, and `Tile`.

**LargeIcon**

* Each item appears as a fully-sized icon with a label below it.

<div align="left"><img src="https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-a721686e37c20748ce38f4e994b6daca36aa7468%2Fimage.png?alt=media" alt="Icons from icons8.com."></div>

**SmallIcon**

* Each item appears as a small icon with a label to its right.

<div align="left"><img src="https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-7266a75815488c1ad78dc2bb72ac441a4b3af615%2Fimage.png?alt=media" alt="Icons from icons8.com"></div>

**Details**

* Each item appears on a separate line with further information about each item arranged in columns.

<div align="left"><img src="https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-27d03c5996e0a580b04ad199d8393c52b7fa1cd5%2Fimage.png?alt=media" alt="Icons from icons8.com"></div>

**Tile**

* Each item appears as a full-sized icon with the item label and sub item information below the label.

<div align="left"><img src="https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-53d7600a1fd513e9e8563ddde1c207722e063f7d%2Fimage.png?alt=media" alt="Icons from icons8.com"></div>

## Advanced

### JavaScript Widget

| Item                | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Class name          | wisej.web.ListView                                                                                                                                                                                                                                                                                                                                                                                                   |
| Theme appearance    | "listview" is the entire widget, "item-view" is the container for the items, "grid-view" is the container for the items when the view is "Details", "grid-row" is the item when the view is "Details", "grid-cell" is one cell in the grid when view is "Details", "item" is the list item, "tools" is the container for the tool icons. See [Themes](https://docs.wisej.com/theme-builder/theme-elements/elements). |
| Child components    | See [JavaScript](https://docs.wisej.com/docs/concepts/javascript-object-model).                                                                                                                                                                                                                                                                                                                                      |
| ToolContainer state | "listview", see [Embedded Tools](https://docs.wisej.com/docs/controls/general/embedded-tools).                                                                                                                                                                                                                                                                                                                       |
| Source code         | [https://github.com/iceteagroup/wisej-js](https://github.com/iceteagroup/wisej-js/blob/master/wisej.web.TextBox.js)                                                                                                                                                                                                                                                                                                  |
