Class TRkROGridDataLink (unit RkROGrid)

Inherits from

TDataLink

Forward class reference

Constructors


constructor Create( AGrid : TRkDBReadOnlyGrid );

===============================} {== TRkROGridDataLink Methods ==} {===============================


Functions

procedure ActiveChanged;

========================================================================= TRkROGridDataLink.

procedure DatasetChanged;

========================================================================= TRkROGridDataLink.

procedure DatasetScrolled( Distance : Integer );

========================================================================= TRkROGridDataLink.

procedure LayoutChanged;

========================================================================= TRkROGridDataLink.

procedure RecordChanged( Field : TField );

========================================================================= TRkROGridDataLink.

function GetFieldCount : Integer;

Store the grid control using this data link

function GetFields( I : Integer ) : TField;


Properties

property FieldCount : Integer


property Fields : TField


Events

Variables

FGrid : TRkDBReadOnlyGrid;



Constructors


constructor Create( AGrid : TRkDBReadOnlyGrid );

===============================} {== TRkROGridDataLink Methods ==} {===============================


Functions


procedure ActiveChanged;

========================================================================= TRkROGridDataLink.ActiveChanged This method is called whenever the Active property of the associated dataset is changed. In this instance, both of the grid's scroll bars need to be updated. The grid also needs to be repainted to reflect the contents of the new dataset. =========================================================================


procedure DatasetChanged;

========================================================================= TRkROGridDataLink.DatasetChanged This method is called when the dataset changes as a result of a record being inserted or deleted. This method also gets called when a record is posted to the dataset. In this case, this method is called after the RecordChanged method. In this instance, the grid's DataChange method is called to update the buffer count, update the vertical scroll bar, and repaint the grid. Repainting is necessary to update the highlight bar. =========================================================================


procedure DatasetScrolled( Distance : Integer );

========================================================================= TRkROGridDataLink.DatasetChanged This method is called whenever the dataset is moved to a new record. In this instance, the grid's DataChange method is called to update the buffer count, update the vertical scroll bar, and repaint the grid. Repainting is necessary to update the highlight bar. =========================================================================


procedure LayoutChanged;

========================================================================= TRkROGridDataLink.LayoutChanged This method is called whenever a change is made to a property in one of the dataset's field objects that causes the appearance of the field's data to change. For example, if the Visible property of a field object is set to False, the corresponding column should be removed from the grid's display. In this instance, the grid is repainted to reflect the change. =========================================================================


procedure RecordChanged( Field : TField );

========================================================================= TRkROGridDataLink.RecordChanged This method is called whenever a field in the current record is modified. This method is also called when the current record in the dataset is posted to the database. In this case, this method is called before the DatasetChanged method. In this instance, the grid is repainted to reflect any changes made to the current record. =========================================================================


function GetFieldCount : Integer;

Store the grid control using this data link


function GetFields( I : Integer ) : TField;


Properties


property FieldCount : Integer


property Fields : TField


Events


Variables


FGrid : TRkDBReadOnlyGrid;