Data-Aware Grids to display and operate on information held in a database
TCustomDBGrid
- the Base class for TDBGrid, a data-aware component for displaying information from a database in the manner of a Stringrid
HowToUseDataAwareControls HowToUseGrids
TColumn
- one of the physical columns of the display in a DataBase Grid (not necessarily the same as a Column in a SQL database)

TColumn - one of the physical columns of the display in a DataBase Grid

Each column may display the information held in a Field of the DataSet to which the DBGrid is attached, but the order of appearance of the columns need not correspond to the order in which the Fields exist in the DataSet, nor need all Fields be represented by a Column.

TColumn
- one of the physical columns of the display in a DataBase Grid (not necessarily the same as a Column in a SQL database)

TColumn - one of the physical columns of the display in a DataBase Grid

Each column may display the information held in a Field of the DataSet to which the DBGrid is attached, but the order of appearance of the columns need not correspond to the order in which the Fields exist in the DataSet, nor need all Fields be represented by a Column.

Find which field's data is to be displayed in this column
Find which DataSet is to be used
Creates a new instance of this collection item.
Create
instantiates a new item in a . It is called by the function and should under normal circumstances never be called directly.

Destroys this collection item.

Destroy removes the item from the managing collection and Destroys the item instance.

This is the only way to remove items from a collection;

Is this the default column for consideration in this DB grid?
The Field in the DataSet that is to be associated with this Column, for display , editinig etc
Refers to the whole entity Field, including contents, name, position in the dataset, properties such as read/write enabling etc
The format to be used for display in this column
The name of the field (as a string), as returned from the dataset
TCustomDBGrid
- the base class for TDBGrid , for displaying database information in the manner of a StringGrid
HowToUseDataAwareControls HowToUseGrids
The DataSource from which this grid displays - usually the result of a database Query
Set True to prevent writing to grid; set False to allow modification
Event handler for mouse click in a cell of the grid
Event handler if mouse enters column or it gains focus
Event handler if mouse leaves column or it loses focus
OnColumnMoved
- event handler for moving a column
Event handler if the cell in this column requires to be drawn
Event handler if field is associated with an edit mask
Event handler for mouse click on Title
Create an instance of this control
DefaultDrawColumnCell
- the default method for drawing cells in this column
Destroy the control and returns its resources
The selected field, for editing, data input or simply viewing
OptionsExtra
- the extra options for this grid
OptionsExtra
- the extra options for this grid: autocolumns and enable checkboxes
SelectedRows
- recorded as a bookmark list
OnColumnSized
- event handler for re-sizing a column
OnUserCheckboxBitmap
- event handler: user-defined bitmap for checkboxes

OnUserCheckboxBitmap - event handler: user-defined bitmap for checkboxes

The user is encouraged to provide bitmaps to represent the three states for database grid checkboxes: gcbpUnChecked, gcbpChecked and gcbpGrayed

Initiate the action associated with this control
EditorByStyle
- the editor to be used for this grid, specified by Style
ResetColWidths
- restore the column widths to their default values
Selected index - number of the row selected for viewing or editing
The selected column for viewing or editing
Columns and fields are often used interchangeably, but their properties are different.
TdbGrid
- a data-aware version of TStringGrid, for displaying and operating on a series of Rows and Columns from a database

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

HowToUseDataAwareControls HowToUseGrids
The area of a control on which its components are drawn or painted
The Canvas is the area of screen on which the various components are drawn.
This inherits its properties from TCanvas,
and that description should be read to understand their definitions more fully.
Used to align the control in one of four directions.

// standard properties, which should be supported by all descendants

Either reads a flag containing alignment instructions (FAlign) or writes alignment instructions (SetAlign)

May have no alignment, may have custom or client alignment, or can be aligned to top, bottom, left or right

The set of anchor definitions for this control

// standard properties, which should be supported by all descendants

Determines how the control is to be anchored to its client or parent conrol

Either reads a flag containing the set of anchors to be used, or writes a set of anchors. If they have been written, this is indicated in IsAnchorsStored

Automatically advance down the grid on successive mouse clicks
Automatically fill columns with default values if nothing else specified
The available border styles for this sort of control
Only a restricted series of options is available: none or a single border.
Determine the colour for the current control

// standard properties, which should be supported by all descendants

Reads the value for colour, or stores the value, and sets a flag if the colour is stored.

The default colour is the same as the window in which the control is located.

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

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

The Columns property is configurable from the Object Inspector by selecting the ellipsis (...) next to the property name, in which case a pop-up memo box appears to allow editing. It deals with things like the size, shape and format of the display, and contains a link to the appropriate Field.

Do no confuse Grid columns (in the display) with the SQL usage of COLUMNS, which corresponds to Fields in our environment. The Fields consist of a series of cells arranged in Records, which contain the actual data which are to be displayed and operated upon.

It is entirely possible that not all fields of the dataset are displayed, and so fields do not correspond directly to columns; in fact the Columns property allows the user to configure which data field is to be displayed in each column

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

// standard properties, which should be supported by all descendants

Determine Constraints (max and min height and width) for this control; reads the size constraints or stores new ones.

The DataSource from which this grid displays - usually the result of a database Query
Default value for the height of newly created grid rows.

If new rows of the grid are created by changing the RowCount property, the height of these new rows will be set to the value of the DefaultRowHeight property.

After that the user may redefine this value. If the Options property includes the appropriate value, the row height may also be changed by the user at runtime.

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

// standard properties, which should be supported by all descendants

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

Reads a flag to see whether the control is enabled, or stores a new value. If stored, sets a flag to say so.

The color for the fixed cells of the grid.
The color used by headings.
ParentColor
- should the control have the same colour as the parent? Default is true
ParentFont
- should the control use the same font as the parent? Default is true
PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
// standard properties, which should be supported by all descendants
Reads the details of the pop-up menu, or stores them.
Properties are defined in the parent class TPopupMenu
Set True to prevent writing to grid; set False to allow modification
Flag to determine: Is hint to be displayed for this control?
// standard properties, which should be supported by all descendants
Reads flag or writes one to determine if a hint is to be shown when mouse hovers over this control. If value is stored, a storage flag is set. Display of the actual hint is controlled by OnShowHint
The place this control occupies in the list of tabs
Reads or writes information in flag; default is -1
TabStop
- determines if the user can tab to a control.

Reads or writes boolean flag; default is False

Use the TabStop to allow or disallow access to the control using the Tab key.

If TabStop is True, the control is in the tab order. If TabStop is False, the control is not in the tab order and the user can't use the Tab key to move to the control.

The font to be used in the grid's title
Visible
- can the control be seen?

    The Visible property represents the ability to see a visual control.
              If Visible is True the control is shown, otherwise it is hidden.
              Calling Show sets, among others, Visible to True.
              Setting Visible to False is equivalent to calling Hide method.

The Visible property does not depend on control's parent visibility. Use IsVisible method to consider this and get real visibility.
Event handler for mouse click in a cell of the grid
Event handler if mouse enters column or it gains focus
Event handler if mouse leaves column or it loses focus
Event handler if the cell in this column requires to be drawn
Event Handle for mouse double-click

Double-clicking is much more common in a Windows environment than in Unix or Linux, where single-clicking is the default method for selecting an object. However, in all environments there could be valid use for a double-click, and a method should be supplied if appropriate.

Event handler for when the Edit button is clicked
OnEnter
- event handler for when the mouse enters the control, and the control receives focus
OnExit
- event handler for when the mouse leaves the control and it loses focus
OnKeyDown
- event handler for instance when key is down while control has focus

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

Differs from OnKeyPress in that the key may have already been down when the control received focus; with OnKeyPress the key needs to become pressed while the control has focus.

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

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

Differs from OnKeyDown in that the key needs to become pressed while the control has focus; with OnKeyDown the key may have already been down when the control received focus.

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

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

The key may already have been up when the control received focus, or a pressed key may become released during the time the control has focus.

Event handler for when a mouse button is pressed down
Event handler for mouse movement within the current control
Event handler for when the mouse button is released, ie "up"
Event handler for mouse click on Title
The colour of the border for this control
Default style for displaying text - includes alignment, layout, single or multi-lines
The border style for the editor used in this grid
Is grid ready to accept edits? (EditorMode True)
Is the FastEditing method being used?
Colour to be used for GridLines
Style to be used for GridLines
Colour to be used for selected cells
The other colour which can be used in this grid (eg for highlighting selected text etc)
DragCursor
- the style of cursor to be used during the Drag process
DragMode
- whether manual or automatic
The ScrollBars to be used with this grid
The style to be used for the grid's title
Event handler for the Drag-Drop manoeuvre
Event handler for the case when a control is dragged over another control
Event handler for the end of a dragging process
Event handler if field is associated with an edit mask
Event handler for when the editor is selected
Event handler for start of dragging process
Whether the Edit mode is automatically entered when a cell is selected
Determines the border spacing for this control

// standard properties, which should be supported by all descendants

Determines the border spacing for this control

Reads flag to find stored spacing values required for the border of the control, or writes the flag to set the spacing.

The properties are defined in the parent class TControlBorderSpacing