[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'DBGrids' (#lcl)

TCustomDBGrid

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomDBGrid - the base class for TDBGrid , for displaying database information in the manner of a StringGrid

Declaration

Source position: dbgrids.pas line 268

type TCustomDBGrid = class(TCustomGrid)

protected

  procedure AddAutomaticColumns;

  

  procedure BeforeMoveSelection(); override;

  

  procedure BeginLayout;

  

  procedure CellClick(); override;

  

  procedure ChangeBounds(); override;

  

  procedure InvalidateSizes;

  

  procedure ColRowMoved(); override;

  

  function ColumnEditorStyle();

  

  function CreateColumns; override;

  

  procedure CreateWnd; override;

  

  procedure DefineProperties(); override;

  

  procedure DefaultDrawCell();

  

  procedure DoExit; override;

  

  function DoMouseWheelDown(); override;

  

  function DoMouseWheelUp(); override;

  

  procedure DoOnChangeBounds; override;

  

  procedure DoPrepareCanvas(); override;

  

  procedure DrawAllRows; override;

  

  procedure DrawFocusRect(); override;

  

  procedure DrawRow(); override;

  

  procedure DrawCell(); override;

  

  procedure DrawCheckboxBitmaps();

  

  procedure DrawFixedText();

  

  procedure EditingColumn();

  

  procedure EditorCancelEditing;

  

  procedure EditorDoGetValue; override;

  

  function EditorCanAcceptKey(); override;

  

  function EditorIsReadOnly; override;

  

  procedure EndLayout;

  

  function FieldIndexFromGridColumn();

  

  function GetBufferCount;

  

  function GetDefaultColumnAlignment(); override;

  

  function GetDefaultColumnWidth(); override;

  

  function GetDefaultColumnReadOnly(); override;

  

  function GetDefaultColumnTitle(); override;

  

  function GetDefaultRowHeight; override;

  

  function GetDsFieldFromGridColumn();

  

  function GetEditMask(); override;

  

  function GetEditText(); override;

  

  function GetFieldFromGridColumn();

  

  function GetGridColumnFromField();

  

  function GetIsCellSelected(); override;

  

  function GridCanModify;

  

  procedure GetSBVisibility(); override;

  

  procedure GetSBRanges(); override;

  

  procedure HeaderClick(); override;

  

  procedure HeaderSized(); override;

  

  function IsValidChar();

  procedure KeyDown(); override;

  

  procedure LinkActive(); virtual;

  

  procedure LayoutChanged; virtual;

  

  procedure Loaded; override;

  

  procedure MoveSelection; override;

  

  procedure MouseDown(); override;

  

  procedure MouseMove(); override;

  procedure PrepareCanvas(); override;

  

  procedure RemoveAutomaticColumns;

  

  procedure SelectEditor; override;

  

  procedure SetEditText(); override;

  

  function SelectCell(); override;

  

  procedure UpdateActive; virtual;

  

  procedure UpdateData; virtual;

  

  function UpdateGridCounts;

  

  procedure WMVScroll(); message;

  

  procedure WndProc(); override;

  

  property GridStatus: TDbGridStatus; [rw]

  

  property DataSource: TDataSource; [rw]

  

The DataSource from which this grid displays - usually the result of a database Query

  property Options: TDbGridOptions; [rw]

  

  property OptionsExtra: TDbGridExtraOptions; [rw]

  

OptionsExtra - the extra options for this grid

  property ReadOnly: Boolean; [rw]

  

Set True to prevent writing to grid; set False to allow modification

  property SelectedRows: TBookmarkList; [r]

  

SelectedRows - recorded as a bookmark list

  property OnCellClick: TDBGridClickEvent; [rw]

  

Event handler for mouse click in a cell of the grid

  property OnColEnter: TNotifyEvent; [rw]

  

Event handler if mouse enters column or it gains focus

  property OnColExit: TNotifyEvent; [rw]

  

Event handler if mouse leaves column or it loses focus

  property OnColumnMoved: TMovedEvent; [rw]

  

OnColumnMoved - event handler for moving a column

  property OnColumnSized: TNotifyEvent; [rw]

  

OnColumnSized - event handler for re-sizing a column

  property OnDrawColumnCell: TDrawColumnCellEvent; [rw]

  

Event handler if the cell in this column requires to be drawn

  property OnFieldEditMask: TGetDbEditMaskEvent; [rw]

  

Event handler if field is associated with an edit mask

  property OnPrepareCanvas: TPrepareDbGridCanvasEvent; [rw]

  

  property OnSelectEditor: TDbGridSelEditorEvent; [rw]

  

  property OnTitleClick: TDBGridClickEvent; [rw]

  

Event handler for mouse click on Title

public

  constructor Create(); override;

  

Create an instance of this control

  procedure InitiateAction; override;

  

Initiate the action associated with this control

  procedure DefaultDrawColumnCell();

  

DefaultDrawColumnCell - the default method for drawing cells in this column

  function EditorByStyle(); override;

  

EditorByStyle - the editor to be used for this grid, specified by Style

  procedure ResetColWidths;

  

ResetColWidths - restore the column widths to their default values

  destructor Destroy; override;

  

Destroy the control and returns its resources

  property SelectedField: TField; [rw]

  

The selected field, for editing, data input or simply viewing

  property SelectedIndex: Integer; [rw]

  

Selected index - number of the row selected for viewing or editing

  property SelectedColumn: TColumn; [r]

  

The selected column for viewing or editing

  property ThumbTracking: Boolean; [rw]

  

end;

Inheritance

TCustomDBGrid

  

TCustomDBGrid - the base class for TDBGrid , for displaying database information in the manner of a StringGrid

|

TCustomGrid

?

TObject

See also

HowToUseDataAwareControls

  

HowToUseDataAwareControls - Hints for accessing databases

HowToUseGrids

  

How to use Grids including StringGrids, DrawGrids and DbGrids