Class TRbwRowDataGrid

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TRbwRowDataGrid = class(TCustomRBWDataGrid)

Description

TRbwRowDataGrid is a TStringGrid that restricts the data displayed in a cell based on the Format of the TRbwRow associated with the cell. Cells can also display a combobox or button in a cell

.

Hierarchy

Overview

Fields

Private FColumns: TAutoAdjustColumns;
Private FFixedRows: integer;
Private FRows: TRbwDataGridRows;
Private FUpdateCount: Integer;

Methods

Private procedure SetColumns(const Value: TAutoAdjustColumns);
Private procedure SetRows(const Value: TRbwDataGridRows);
Protected function ShouldAdujstColWidths(ACol: integer): boolean; override;
Protected function CollectionItem(const ACol, ARow: Longint): TCustomRowOrColumn; override;
Protected function ColumnOrRow: integer; override;
Protected function ColorSelectedRowOrColumn(ACol, ARow: integer): boolean; override;
Protected function CreateColumns: TAutoAdjustColumns; dynamic;
Protected function CreateRows: TRbwDataGridRows; dynamic;
Protected function GetFixedRows: integer; virtual;
Protected function IsCaptionCell(ACol, ARow: integer): boolean; override;
Protected procedure AdjustColWidths(const ACol: integer); override;
Protected procedure AdjustRowHeights(const ARow: integer); override;
Protected procedure ColumnMoved(FromIndex, ToIndex: Longint); override;
Protected procedure Loaded; override;
Protected procedure RowMoved(FromIndex, ToIndex: Longint); override;
Protected procedure SetFixedRows(const Value: integer); virtual;
Protected procedure SizeChanged(OldColCount, OldRowCount: Longint); override;
Public procedure BeginUpdate; override;
Public procedure EndUpdate; override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure DeleteColumn(ACol: Longint); override;
Public procedure DeleteRow(ARow: Longint); override;
Public procedure InsertColumn(ACol: Integer); override;
Public procedure InsertRow(ARow: Integer); override;

Properties

Published property ColorSelectedColumn : boolean read FColorSelectedColumnOrRow write SetColorSelectedColumnOrRow;
Published property Columns: TAutoAdjustColumns read FColumns write SetColumns;
Published property FixedRows: integer read GetFixedRows write SetFixedRows;
Published property Rows: TRbwDataGridRows read FRows write SetRows;

Description

Fields

Private FColumns: TAutoAdjustColumns;

See Columns.

Private FFixedRows: integer;

See FixedRows.

Private FRows: TRbwDataGridRows;

See Rows.

Private FUpdateCount: Integer;
 

Methods

Private procedure SetColumns(const Value: TAutoAdjustColumns);

See Columns.

Private procedure SetRows(const Value: TRbwDataGridRows);

See Rows.

Protected function ShouldAdujstColWidths(ACol: integer): boolean; override;
 
Protected function CollectionItem(const ACol, ARow: Longint): TCustomRowOrColumn; override;

CollectionItem returns Rows[ARow].

Protected function ColumnOrRow: integer; override;
 
Protected function ColorSelectedRowOrColumn(ACol, ARow: integer): boolean; override;
 
Protected function CreateColumns: TAutoAdjustColumns; dynamic;

CreateColumns creates and returns an instance of TAutoAdjustColumns.

Protected function CreateRows: TRbwDataGridRows; dynamic;

CreateRows creates and returns an instance of TRbwDataGridRows.

Protected function GetFixedRows: integer; virtual;

See FixedRows.

Protected function IsCaptionCell(ACol, ARow: integer): boolean; override;
 
Protected procedure AdjustColWidths(const ACol: integer); override;

AdjustColWidths is used to calculate the width of the cell required to fit the text in the cell. If AutoAdjustColWidths is true, AdjustColWidths is used to change the width of the columns.

Protected procedure AdjustRowHeights(const ARow: integer); override;
 
Protected procedure ColumnMoved(FromIndex, ToIndex: Longint); override;

ColumnMoved adjusts Columns when the user moves a column.

Protected procedure Loaded; override;

Loaded sets the FixedCols and FixedRows and calls AdjustColWidths for each column.

Protected procedure RowMoved(FromIndex, ToIndex: Longint); override;

RowMoved adjusts Rows when the user moves a row.

Protected procedure SetFixedRows(const Value: integer); virtual;

See FixedRows.

Protected procedure SizeChanged(OldColCount, OldRowCount: Longint); override;

SizeChanged adds or removes items in Columns and Rows if the number of columns or rows changes.

Public procedure BeginUpdate; override;
 
Public procedure EndUpdate; override;
 
Public constructor Create(AOwner: TComponent); override;

Create initializes grid.

Public destructor Destroy; override;

Destroy destroys the grid. Don't call Destroy directly. Call Free instead.

Public procedure DeleteColumn(ACol: Longint); override;
 
Public procedure DeleteRow(ARow: Longint); override;
 
Public procedure InsertColumn(ACol: Integer); override;

Use InsertColumn to insert a column at position ACol.

Public procedure InsertRow(ARow: Integer); override;

Use InsertRow to insert a row at position ARow.

Properties

Published property ColorSelectedColumn : boolean read FColorSelectedColumnOrRow write SetColorSelectedColumnOrRow;
 
Published property Columns: TAutoAdjustColumns read FColumns write SetColumns;

Columns is used to specify if the width of a column should be automatically adjusted to fit its content.

Published property FixedRows: integer read GetFixedRows write SetFixedRows;

FixedRows is the number of fixed rows in the grid.

Published property Rows: TRbwDataGridRows read FRows write SetRows;

Rows allows properties of individual rows to be specified. See TRbwDataGridRows.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:59