RefreshDataFromExternal - cDbCJGrid
Refreshes and redisplays a grid based around the active record in your global table buffer and the offset from top by iOffset
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iOffset | Integer | An offset preference for displaying this row, where 0 or is the first visible row in the grid, 1 is the second visible row, etc. ropBottom, ropCenter and ropTop constants apply. |
Syntax
Procedure RefreshDataFromExternal Integer iOffset
Call Example
Send RefreshDataFromExternal iOffset
Description
RefreshDataFromExternal refreshes your grid based around an active record in your global table buffer.
The table buffer to be used is determined by your DataDictionary Object's (DDO's) Main_File property, but it uses the global table buffer, not the DDO's buffer. It does this by calling RefreshDataFromMatchingRow.
It places this record iOffset rows from the grid and finds record above and below this record. See SynchronizeGridtoSelectedRow for details.
Note that this uses the value of RowId of your table buffer, which may not be the same as the current row of your DDO. This can be used to refresh your grid based around a record that has been found outside of your DataDictionary's finding logic, such as a record found with the Find command.
This will work with dynamic and static (pbStaticData) grids, just that with static grids, all the data is reloaded.
It is the developer's responsibility to make sure that the target record for this refresh is a valid record. It must exist and it must be constraint valid. If the record is not valid, the refresh will not succeed and the HandleCacheError method will be called. When HandleCacheError is called, it will handle this condition by refreshing the grid and, if pbSuppressCacheError is False, reporting an error.