DevExtreme Vue - Enable Paging
Paging options are set in the DataSource: paginate enables paging; pageSize specifies how many data items a page should contain.
jQuery
$(function() { $("#lookupContainer").dxLookup({ dataSource: new DevExpress.data.DataSource({ store: /* A store is configured here */, paginate: true, pageSize: 10 }), // ... }); });
Angular
import DataSource from "devextreme/data/data_source"; import { DxLookupModule } from "devextreme-angular"; // ... export class AppComponent { lookupDataSource: any = {}; constructor() { this.lookupData = new DataSource({ store: /* A store is configured here */, paginate: true, pageSize: 10 }) } } @NgModule({ imports: [ // ... DxLookupModule ], // ... })
<dx-lookup ... [dataSource]="lookupData"> </dx-lookup>
ASP.NET MVC Controls
@(Html.DevExtreme().Lookup() .ID("lookup") .DataSource(d => d // Data access is configured here ) .DataSourceOptions(o => o .Paginate(true) .PageSize(10) ) )
Lookup renders the next page once a user scrolls the item list to the bottom. If you set the pageLoadMode to "nextButton", Lookup renders the next page when a user clicks the Next button. You can change this button's text using the nextButtonText option:
jQuery
$(function() { $("#lookupContainer").dxLookup({ // ... pageLoadMode: "nextButton", nextButtonText: "More" }); });
Angular
<dx-lookup ... pageLoadMode="nextButton" nextButtonText="More"> </dx-lookup>
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 Service | PHP Service | MongoDB Service | OData Service | Custom Sources | JavaScript Array
- Lookup - Enable Grouping
- Lookup Demos
If you have technical questions, please create a support ticket in the DevExpress Support Center.