List

The List is a widget that represents a collection of items in a scrollable list.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/list
Export: default
List interactive configuration
Copy Code
Copy to Codepen
$("#list").dxList({
});

                    

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the List widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
JavaScript
HTML
$(function () {
    $("#list").dxList({
        dataSource: [ "Item 1", "Item 2", "Item 3" ],
        searchEnabled: true
    });
});
<div id="list"></div>
Angular
HTML
TypeScript
<dx-list
    [dataSource]="listData"
    [searchEnabled]="true">
</dx-list>
import { DxListModule } from 'devextreme-angular';
// ...
export class AppComponent {
    listData = [ "Item 1", "Item 2", "Item 3" ];
}
@NgModule({
    imports: [
        // ...
        DxListModule
    ],
    // ...
})
AngularJS
HTML
JavaScript
<div ng-controller="DemoController">
    <div dx-list="{
        dataSource: listData,
        searchEnabled: true
    }"></div>
</div>
angular.module('DemoApp', ['dx'])
    .controller("DemoController", function ($scope) {
        $scope.listData = [ "Item 1", "Item 2", "Item 3" ];
    });
Knockout
HTML
JavaScript
<div data-bind="dxList: {
    dataSource: listData,
    searchEnabled: true
}"></div>
var viewModel = {
    listData: [ "Item 1", "Item 2", "Item 3" ]
};
ko.applyBindings(viewModel);
ASP.NET MVC Controls
Razor C#
Razor VB
@(Html.DevExtreme().List()
    .ID("list")
    .DataSource(new[] { "Item 1", "Item 2", "Item 3" })
    .SearchEnabled(true)
)
@(Html.DevExtreme().List() _
    .ID("list") _
    .DataSource({ "Item 1", "Item 2", "Item 3" }) _
    .SearchEnabled(True)
)
See Also

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the List widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.

See Also

Default Item Template

This section lists the data source fields that are used in a default template for list items.

Type:

Object

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is a list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also