aspnetcore-400778-devextreme-based-controls-controls-list.md
List is a UI control that displays data from local or remote data storage and allows users to group, select, search, reorder, and delete items.
The List UI Control is based on the DevExtreme List component.
To add this control to your project, follow instructions in the following help topics:
@(Html.DevExtreme().List()
.Items(i => {
i.Add().Text("Item One");
i.Add().Text("Item Two");
i.Add().Text("Item Three");
})
)
using Microsoft.AspNetCore.Mvc;
namespace ASP.NET_Core.Controllers {
public class ListController : Controller {
public IActionResult GettingStarted() {
return View();
}
}
}
Selection
Users can select one or multiple items in the List component.
Search
Activate the search bar by setting the searchEnabled property to true.
Reorder and Delete Items
You can also configure reordering and deletion of List items.
Grouping
Display items in a two-level hierarchy with groups. Use the groupTemplate option to customize group headers.
Customize Item Appearance
Use the itemTemplate property to customize the appearance of List items.
InitializationCall the List() method to create a List control. This action initializes a ListBuilder instance. Use the instance methods to specify List options and event handlers.OptionsFor a complete option list, see Options. For details on how to specify control options, refer to the following help topic: Specify Options.EventsFor available events, see Events. For details on how to handle events, refer to the following help topic: Handle Events and Define Callbacks.
OptionsIf you need to specify the List options dynamically on the client side, use client-side API. For a complete option list, see DevExtreme List options.MethodsFor a list of available methods, see DevExtreme List methods. For details on how to call methods, refer to the following help topic: Call Methods.
For more information on List accessibility compliance, refer to the following help topic: Accessibility.
See Also