There are cases in which you may want to fetch only a fixed number of records and perform operations over this specified set of data. Telerik RadGrid allows such data manipulation through the custom paging mechanism integrated in the control. The main steps you need to undertake are:
- Set AllowPaging = true and AllowCustomPaging = true for your grid instance
- Implement code logic which to extract merely a fixed number of records from the grid source and present them in the grid structure
- The total number of records in the grid source should be defined through the VirtualItemCount property of the MasterTableView/GridTableView instance. Thus the grid "understands" that the data source contains the specified number of records and it should fetch merely part of them at a time to execute requested operation.
This example demonstrates the approach for custom paging depicted above. The simulated "DataLayer" wraps the logic for extracting records only for the specified page (along with deleting records option). Telerik RadGrid maintains the pager buttons, changing of pager and other presentation specific features.