GridControl.LoadMoreCommand Property
Gets or sets the command executed when an end-user scrolls to the bottom of the grid to load new data items. This is a bindable property.
Namespace: DevExpress.Mobile.DataGrid
Assembly: DevExpress.Mobile.Grid.v18.2.dll
Declaration
Property Value
Type | Description |
---|---|
ICommand | A command that exposes the ICommand interface. |
Remarks
Important
This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.
The GridControl supports dynamic loading of new data records from the bound data source when an end-user scrolls to the bottom of the grid. To enable this functionality, set the GridControl.IsLoadMoreEnabled property to true. Then, either define a command in a view model and bind it to the grid using the LoadMoreCommand property, or handle the GridControl.LoadMore event.
Example
This example shows how to implement the grid’s load-more feature - when an end-user scrolls to the bottom of the grid, a set of new data items is added to the end of the grid. To add this functionality, follow the steps below.
- Set the GridControl.IsLoadMoreEnabled property to true to enable the grid’s load-more feature.
- Create a command to be executed when an end-user scrolls to the bottom of the grid.
- Bind the created command to the grid using the
GridControl.LoadMoreCommand
property.
In this example, data items for each next load (ten new orders) are generated randomly in code. The maximum number of loads an end-user is allowed to perform is 10. The count of data items currently loaded to the grid is displayed by the total summary that is automatically updated after each load.