Vue List - Paging
Paging properties are set in the DataSource: paginate enables paging; pageSize specifies how many data items a page should contain.
jQuery
$(function() { $("#listContainer").dxList({ dataSource: new DevExpress.data.DataSource({ store: /* A store is configured here */, paginate: true, pageSize: 10 }), // ... }); });
Angular
import { DxListModule } from "devextreme-angular"; import DataSource from "devextreme/data/data_source"; // ... export class AppComponent { listDataSource = new DataSource({ store: /* A store is configured here */, paginate: true, pageSize: 10 }); } @NgModule({ imports: [ // ... DxListModule ], // ... })
<dx-list ... [dataSource]="listDataSource"> </dx-list>
Vue
<template> <DxList :data-source="listDataSource" /> </template> <script> import 'devextreme/dist/css/dx.light.css'; import DxList from 'devextreme-vue/list'; import DataSource from 'devextreme/data/data_source'; const listDataSource = new DataSource({ store: /* A store is configured here */, paginate: true, pageSize: 10 }); export default { components: { DxList }, data() { return { listDataSource } } } </script>
React
import React from 'react'; import 'devextreme/dist/css/dx.light.css'; import List from 'devextreme-react/list'; import DataSource from 'devextreme/data/data_source'; const listDataSource = new DataSource({ store: /* A store is configured here */, paginate: true, pageSize: 10 }); export default function App() { return ( <List dataSource={listDataSource} /> ); }
ASP.NET MVC Controls
@(Html.DevExtreme().List() .ID("list") .DataSource(d => d // Data access is configured here ) .DataSourceOptions(o => o .Paginate(true) .PageSize(10) ) )
The next page can be rendered when a user scrolls the List down to the bottom, or after a user clicks the More button. Set the pageLoadMode property to specify the mode:
jQuery
$(function() { $("#listContainer").dxList({ // ... pageLoadMode: "scrollBottom" // or "nextButton" }); });
Angular
<dx-list ... pageLoadMode="scrollBottom"> <!-- or "nextButton" --> </dx-list>
import { DxListModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxListModule ], // ... })
Vue
<template> <DxList ... page-load-mode="scrollBottom" /> <!-- or "nextButton" --> </template> <script> // ... </script>
React
// ... export default function App() { return ( <List ... pageLoadMode="scrollBottom" /> {/* or "nextButton" */} ); }
Local arrays and remote datasets loaded using the CustomStore in raw mode are only rendered page by page. In other cases, remote datasets are also loaded page by page if the server can partition data.
See Also
- Data Binding: Web API, PHP, MongoDB | OData Service | Custom Sources | JavaScript Array
- List - Localization
If you have technical questions, please create a support ticket in the DevExpress Support Center.