Skip to content

SynchronizeDataForSelectedRow - cCJGridDataSource

Instructs the datasource object to synchronize SelectedRow data between and cache and the external data store

Type: Procedure

Parameters

Parameter Type Description
bPushData Boolean If True, moves data from the datasource to the external store. If False, moves data from the external store to the datasource. The "extermal store" is the table buffer.
iFlags Integer Optional flag values passed by the DataDictionary object.

Syntax

Procedure SynchronizeDataForSelectedRow Boolean bPushData Integer iFlags

Call Example

Send SynchronizeDataForSelectedRow bPushData iFlags

Description

SynchronizeDataForSelectedRow was created to allow the datasource and the DataDictionary's table buffer (the external store) to exchange data. This is required to support the DataDictionary Request_Find and cDbCJGrid.Refresh messages.

SynchronizeDataForSelectedRow instructs the DataSource to resynchronize the cache for the SelectedRow. If bPushData is True, it synchronizes the external store with the contents of the cache for the selected row, pushing data to the external store. Otherwise, it synchronizes the cache with the contents of the external store for the selected row, pulling data from the external store.

The external store is the table buffer used by the datasource's DataDictionary Server. This bypasses DataDictionary local buffers and moves data directly between the global record buffers and the cache. This is used by the grid to synchronize the cache with changes to the external store made outside of the normal data flow pattern. It's also used to synchronize the external store with the contents of the cache outside the normal data flow pattern.

cCJGrid / cCJGridDataSource

This message does nothing. There is no external store.

cDbCJGrid / cDbCJGridDataSource

This is used to move data between the table buffer and datasource. When the DataDictionary finds a new record it sends the Refresh message to the grid, which sends SynchronizeDataForSelectedRow, passing bPushData as False (move from table buffer to datasource). When a cDbCJGrid.Request_Find is initiated, in the grid it seeds the table buffer by sending SynchronizeDataForSelectedRow, passing bPushData as True (move from data source to table buffer).

You will never send this message and will probably never augment it. If you create a custom datasource class, this interface must be supported.