PageInRows - cCJGridDataSource
Used to manage the datasource cache. Makes sure that rows specified are loaded in the cache.
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| ByRef iFirstRow | Integer | The first row that must be loaded |
| ByRef iLastRow | Integer | The last row that must be loaded |
Syntax
Procedure PageInRows ByRef Integer iFirstRow ByRef Integer iLastRow
Call Example
Send PageInRows iFirstRow iLastRow
Description
PageInRows is used to manage cached data. The grid calls this when it needs to display a page of data. Before displaying the data, it calls PageInRows to make sure that the proper data is loaded.
cCJGrid / cCJGridDataSource
This does nothing. If the data is static, it should be loaded.
cDbCJGrid / cDbCJGridDataSource
This method first checks if the rows requested are already in the cache. If so, it does not need to do anything and it returns.
If the rows are not yet loaded, the grid will attempt load the rows requested. Normally, rows need to be paged in response to keyboard scrolling through your data (Up, Down, Page_Up, Page_Down). If you ask for data that is outside of the range in your cache, new rows must be paged in.
The first and last rows requested are row numbers relative to the current cache. If you wish to load records after the end of the cache, you pass a number that is greater than the current number of rows. If you wish to load records that are before the start of your cache, you pass in negative numbers. If the requested number of rows cannot be added, the rows that can be added will be added and the datasource will use this information internally to recognize that it has reached the top or bottom of the external data.
This procedure does not actually remove rows from the cache. That occurs later, when NormalizeDataSource is called.
You will never send this message and will probably never augment it. If you create a custom datasource class, this interface must be supported.