ListViewComponent
Represents the Kendo UI ListView component for Angular. Displays a list of data items and supports paging, editing, and custom templates (see overview).
@Component({
selector: 'my-app',
template: `
<kendo-listview
[data]="items"
[pageable]="true"
[pageSize]="5">
<ng-template kendoListViewItemTemplate let-dataItem>
<div class="item">
<h3>{{ dataItem.name }}</h3>
<p>{{ dataItem.description }}</p>
</div>
</ng-template>
</kendo-listview>
`
})
export class AppComponent {
items = [
{ name: 'Item 1', description: 'First item' },
{ name: 'Item 2', description: 'Second item' }
];
}
Selector
kendo-listview
Export Name
Accessible in templates as #kendoListViewInstance="kendoListView"
Inputs
Name | Type | Default | Description |
---|---|---|---|
bordered |
|
|
Specifies if a border should be rendered around the listview element. |
containerClass? |
|
Specifies the CSS class that renders on the content container element of the ListView.
Supports the type of values that | |
containerLabel? |
|
Specifies the content container | |
containerRole |
|
|
Specifies the content container |
containerStyle? |
|
Specifies the CSS styles that render on the content container element of the ListView.
Supports the type of values that | |
data |
|
Specifies the data collection that populates the ListView (see data binding examples). | |
height? |
|
Specifies the height (in pixels) of the ListView component. When the content height exceeds the component height, a vertical scrollbar renders. To set the height of the ListView, you can also use | |
itemClass? |
|
Specifies the CSS class that renders on each item element wrapper of the ListView.
Supports the type of values that | |
itemStyle? |
|
Specifies the CSS styles that render on each item element wrapper of the ListView.
Supports the type of values that | |
listItemRole |
|
|
Specifies the list item |
loading |
|
|
Specifies whether the loading indicator of the ListView displays (see example). |
navigable |
|
|
Specifies whether keyboard navigation is enabled (see example). |
pageable |
|
Configures whether the ListView renders a pager (more details). When you provide a boolean value, it renders a pager with the default settings. | |
pageSize? |
|
Specifies the page size used by the ListView pager (more details). | |
skip |
|
Defines the number of records to be skipped by the pager (more details). |
Fields
Name | Type | Default | Description |
---|---|---|---|
activeIndex |
|
Gets the current active item index
(see example).
Returns |
Events
Name | Type | Description |
---|---|---|
add |
|
Fires when you click the Add command button to add a new item (see example). |
cancel |
|
Fires when you click the Cancel command button to close an item (see example). |
edit |
|
Fires when you click the Edit command button to edit an item (see example). |
pageChange |
|
Fires when you change the page or the page size of the ListView (see example). You have to handle the event yourself and page the data. |
pageSizeChange |
|
Fires when you change the page size of the ListView. You can prevent this event ( |
remove |
|
Fires when you click the Remove command button to remove an item (see example). |
save |
|
Fires when you click the Save command button to save changes in an item (see example). |
scrollBottom |
|
Fires when you scroll to the last record on the page (see endless scrolling example). |
Methods
addItem | ||||||
---|---|---|---|---|---|---|
Creates a new item editor (see example). | ||||||
|
closeItem | ||||||
---|---|---|---|---|---|---|
Closes the editor for a given item (see example). | ||||||
|
editItem | |||||||||
---|---|---|---|---|---|---|---|---|---|
Switches the specified item to edit mode (see example). | |||||||||
|
focus | ||||||
---|---|---|---|---|---|---|
Focuses the item at the specified index (see example):
| ||||||
|