Class: cCJGridCachedDataSource
Class Hierarchy:
cObject

cCJGridDataSource


cCJGridCachedDataSourceDirect Known Subclasses:
cDbCJGridDataSource, Class Definition
Properties
Boolean
pbAtEnd
has cache discovered last record
Boolean
pbAtTop
has cache discovered first record
Boolean
pbDDReadMode
if true we never actually find the record in the dd - just read
Boolean
pbLoadAll
if true, load all data with first page event
Boolean
pbReverseOrdering
is data source reversed?
Boolean
pbStaticData
determines if datasource is static - once loaded it does not change
Integer
piGridOrdering
Ordering from Grid. See Ordering for actual order which may differ
Integer
piMaxCacheRange
internal - used to keep track of the largest range the grid has requested.
Integer
piMaxCacheSizeAllowed
max size of cache, 0 - unlimited
Integer
piMinPageSize
minimum number of records to page whenever a page is performed
Integer
piRowCount
Normalized Rows in cache
Integer
piRowOffset
Unnormalized off set to rows (if not zero)
Handle
Server
The DD server
Functions and Procedures
Integer
AdjustRowForOffset(Integer iRow)
Boolean
AllDataIsLoaded()

Construct_Object()
tDataSourceRow
CreateDataSourceRow()
Integer
CurrentMaxCache()
return the maximum cache size needed for this grid.
This is tied to the logic in PageInRows and how it caches records. It uses
the current maximum range passed in.
Boolean
DataIsStatic()

Establish_Find_Mode(Integer eFindMode)
Integer
FindExternalDataInCache()
Integer
FindMode(Integer eFindMode)
This handles translation of find modes to make reverse ordering
work. Pass the mode and return the mode, translated if reverse ordering is needed
Integer
FindRowIdInCache(RowID rId)

InitializeDataSource(tDataSourceRow[] DataSource)
This loads all data passed and assumes that this is all of the data.
Integer
NormalizeDataSource(Integer iTopRow)
Adjust RowCount and RowOffset to best fit the cache data.

OnPageData(Boolean bFindUp Integer iRowsToAdd tDataSourceRow[] ByRef DataSource Boolean ByRef bAtTop Boolean ByRef bAtEnd)
if iRowstoAdd is minus, add to top, else add to bottom

OnPageInMatchingRow(RowID riId tDataSourceRow[] ByRef DataSource)
RowID
OnReadFirstRecord()
RowID
OnReadLastRecord()

OnSetTag(tDataSourceRow ByRef DataSourceRow)
Integer
Ordering()
ordering is calculated. If the server has a value, we use that. If not, use the grid's ordering

PageInFirstRow()

PageInLastRow()
Integer
PageInMatchingRow(RowID riId)

PageInRows(Integer ByRef iFirstRow Integer ByRef iLastRow)
currently I adjust first and last row but I don't do anything with the information
First row is the current top row (first displayable row)
Last row is at-least the last displayable. Last - first gives us the range

Read_Next_Record()
Boolean
ReadRecordInBuffer()

Reset()
Integer
RowCount()
Integer
RowOffset()
References (1):