Class: cCJGridDataSource
Class Hierarchy:
cObject

cCJGridDataSourceDirect Known Subclasses:
cCJGridCachedDataSource, Class Definition
Properties
Boolean[]
pbCurrentColumnChanged
Boolean
pbDataSourceSynchRequired
Boolean
pbRowChanged
tDataSourceRow
pCurrentDataSourceRow
tDataSourceRow[]
pDataSource
all private
Handle[]
pDataSourceColumnObjects
Integer
piSelectedRow
Functions and Procedures

AddColumn(Handle hoColumn)
Adds column metadata information to the datasource
Boolean
AllDataIsLoaded()
returns true if all data is loaded
Boolean
CanAddRow()
Boolean
CanDeleteRow()
Boolean
CanSaveRow()

ClearChangedStates()
Integer
ColumnCount()

Construct_Object()
tDataSourceRow
CreateClearedDataSourceRow()
Creates a cleared row. Used by subclasses
tDataSourceRow
CreateDataSourceRow()
called to fill a row with data. Often used to fill data from an external source.
The column object is called with the assumption that the external source (i.e., file buffers)
contain the data needed. Used by sub-classes
String
DataForCell(Integer iRow Integer iColumn)
Boolean
DataIsStatic()
returns true if data is static meaning that once loaded there is no need to go
back to the external datasource to look for new or deleted rows
tDataSourceRow[]
DataSource()
returns entire datasource
Boolean
DataSourceSynchRequired()
This signifies that the datasource needs adjusting and that grid needs updating
Boolean
DeleteSelectedRow()
deletes the row from the back end
Integer
FindColumnValue(Integer iColumn String sValue Boolean bFindGE Integer iStartRow Boolean bSearchUp)
Find the value for this column in the datasource.
This is meant to be used when all data is loaded. bFindGE determines if this is a EQ (false)
or GE (True) find. iStartRow determines the row to start the search at.
This is datatype aware and if performs the proper search for the expected type.

InitializeDataSource(tDataSourceRow[] DataSource)
created this to initialize the data. It can be left empty or used to load data up front

InsertRow(Integer iIndex)
Boolean
IsSelectedRowChanged()
Boolean
IsSelectedRowNew()
Integer
NormalizeDataSource(Integer iTopRow)

PageInFirstRow()

PageInLastRow()
Integer
PageInMatchingRow(RowID riId)

PageInRows(Integer ByRef iFirstRow Integer ByRef iLastRow)

RemoveRow(Integer iIndex)

Reset()
Clears all data from datasource

ResetAll()
resets everything - columns and data

ResetSelectedRow()
Integer
RowCount()
RowID
RowTag(Integer iRow)
Boolean
SaveSelectedRow()
Integer
SelectedRow()

SelectRow(Integer iRow Boolean bUpdateExternalData)
Boolean
ShouldSaveSelectedRow()

SortDataSource(tGridSortRules GridSortRules)
sort datasource data based on rules in GridSortRules. This only sorts loaded data
and it assumes that sorting it does not invalidate it some way

StoreSelectedRow()

SynchronizeDataForSelectedRow(Boolean bPushData Integer iFlags)

UpdateDataForSelectedRow(Integer iColumn String sValue Boolean bUpdateExternalData)
Handle
ValidateSelectedRow()
References (1):