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

TDBGrid

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

TdbGrid - a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

Declaration

Source position: dbgrids.pas line 450

type TDBGrid = class(TCustomDBGrid)

public

  property BorderColor;

  

The colour of the border for this control

  property Canvas;

  

The area of a control on which its components are drawn or painted

  property DefaultTextStyle;

  

Default style for displaying text - includes alignment, layout, single or multi-lines

  property EditorBorderStyle;

  

The border style for the editor used in this grid

  property EditorMode;

  

Is grid ready to accept edits? (EditorMode True)

  property ExtendedColSizing;

  

  property FastEditing;

  

Is the FastEditing method being used?

  property FocusColor;

  

  property FocusRectVisible;

  

  property GridLineColor;

  

Colour to be used for GridLines

  property GridLineStyle;

  

Style to be used for GridLines

  property SelectedColor;

  

Colour to be used for selected cells

  property SelectedRows;

  

published

  property Align;

  

Used to align the control in one of four directions.

  property AlternateColor;

  

The other colour which can be used in this grid (eg for highlighting selected text etc)

  property Anchors;

  

The set of anchor definitions for this control

  property AutoAdvance;

  

Automatically advance down the grid on successive mouse clicks

  property AutoEdit;

  

Whether the Edit mode is automatically entered when a cell is selected

  property AutoFillColumns;

  

Automatically fill columns with default values if nothing else specified

  property BorderSpacing;

  

Determines the border spacing for this control

  property BorderStyle;

  

The available border styles for this sort of control

  property Color;

  

Determine the colour for the current control

  property Columns;

  

Refers to the physical columns of the grid, displaying the contents of the relevant Fields

  property Constraints;

  

Determine Constraints (max and min height and width) for this control

  property DataSource;

  

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

  property DefaultDrawing;

  

  property DefaultRowHeight;

  

Default value for the height of newly created grid rows.

  property DragCursor;

  

DragCursor - the style of cursor to be used during the Drag process

  property DragMode;

  

DragMode - whether manual or automatic

  property Enabled;

  

Whether the control is Enabled. If not, it usually appears 'greyed-out'

  property FixedColor;

  

The color for the fixed cells of the grid.

  property FixedHotColor;

  

  property Flat;

  

  property Font;

  

  property HeaderHotZones;

  

  property HeaderPushZones;

  

  property Options;

  

  property OptionsExtra;

  

  property ParentColor;

  

ParentColor - should the control have the same colour as the parent? Default is true

  property ParentFont;

  

ParentFont - should the control use the same font as the parent? Default is true

  property PopupMenu;

  

PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control

  property ReadOnly;

  

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

  property Scrollbars;

  

The ScrollBars to be used with this grid

  property ShowHint;

  

Flag to determine: Is hint to be displayed for this control?

  property TabOrder;

  

The place this control occupies in the list of tabs

  property TabStop;

  

TabStop - determines if the user can tab to a control.

  property TitleFont;

  

The font to be used in the grid's title

  property TitleStyle;

  

The style to be used for the grid's title

  property UseXORFeatures;

  property Visible;

  

Visible - can the control be seen?

  property OnCellClick;

  

Event handler for mouse click in a cell of the grid

  property OnColEnter;

  

Event handler if mouse enters column or it gains focus

  property OnColExit;

  

Event handler if mouse leaves column or it loses focus

  property OnColumnMoved;

  

  property OnColumnSized;

  

  property OnDrawColumnCell;

  

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

  property OnDblClick;

  

Event Handle for mouse double-click

  property OnDragDrop;

  

Event handler for the Drag-Drop manoeuvre

  property OnDragOver;

  

Event handler for the case when a control is dragged over another control

  property OnEditButtonClick;

  

Event handler for when the Edit button is clicked

  property OnEndDrag;

  

Event handler for the end of a dragging process

  property OnEnter;

  

OnEnter - event handler for when the mouse enters the control, and the control receives focus

  property OnExit;

  

OnExit - event handler for when the mouse leaves the control and it loses focus

  property OnFieldEditMask;

  

Event handler if field is associated with an edit mask

  property OnKeyDown;

  

OnKeyDown - event handler for instance when key is down while control has focus

  property OnKeyPress;

  

OnKeyPress - event controller for a key being pressed while the control has focus

  property OnKeyUp;

  

OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus

  property OnMouseDown;

  

Event handler for when a mouse button is pressed down

  property OnMouseMove;

  

Event handler for mouse movement within the current control

  property OnMouseUp;

  

Event handler for when the mouse button is released, ie "up"

  property OnPrepareCanvas;

  

  property OnSelectEditor;

  

Event handler for when the editor is selected

  property OnStartDrag;

  

Event handler for start of dragging process

  property OnTitleClick;

  

Event handler for mouse click on Title

  property OnUserCheckboxBitmap;

  

  property OnUTF8KeyPress;

end;

Inheritance

TDBGrid

  

TdbGrid - a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

|

TCustomDBGrid

  

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

|

TCustomGrid

?

TObject

Description

TdbGrid - a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

Inherits many of its properties from TCustomGrid and, of course, from TCustomDBGrid

See also

HowToUseDataAwareControls

  

HowToUseDataAwareControls - Hints for accessing databases

HowToUseGrids

  

How to use Grids including StringGrids, DrawGrids and DbGrids