Sign in Join
FPDoc Onlineexperiment

DBGrids unit

Implements a data-aware grid to display and operate on information in a database.

dbgrids.pas contains classes and types needed to implement a database-aware grid control. The following components are added to the Data Controls tab in the Lazarus IDE Component Palette:

  • TDBGrid

The unit also includes the TComponentDatalink component, which is used as the data link for TCustomDBGrid. It was taken from an article by Joanna Carter: "The Ultimate Datalink?" , published in Delphi Magazine Issue #30 February 1998.

Classes and records

EInvalidGridOperationclassException raised for an invalid grid operation.
TBookmarkedRecordEnumeratorclassDefines a bookmarked record enumeration class.
TBookmarkListclassImplements a list of Bookmarks in a database grid.
TColumnclassImplements a display column for the TDBGrid control.
TColumnTitleclassTColumnTitle is a TGridColumnTitle descendant.
TComponentDataLinkclassMaintains an association between a component and a dataset.
TCustomDBGridclassTCustomDBGrid is the base class for TDBGrid.
TDBGridclassData-aware grid control used to display and edit rows and columns in a dataset.
TDBGridColumnsclassImplements a collection for columns in a database-aware grid.

Procedures and functions

RegisterprocedureRegisters components in the unit for use in the Lazarus IDE.

Types

TBookmarkedRecordEnumeratorOptionssetEnumeration with option values for the bookmarked record enumerator.
TColumnOrderenumerationEnumerated type defining alternate ordering for columns.
TDataSetScrolledEventprocedure typeSpecifies an event handler signalled after scrolling a dataset.
TDbGridCellHintEventprocedure typeSpecifies an event handler signalled to get the hint text for a cell in a grid control.
TDbGridCheckBoxBitmapEventprocedure typeSpecifies an event handler signalled to get the user-specified Bitmap for a check box column in a grid control.
TDbGridCheckboxStateEventprocedure typeSpecifies an event handler signalled to get the user-specified state for a check box column on the grid control.
TDBGridClickEventprocedure typeSpecifies an event handler signalled when a grid column in is clicked.
TDbGridExtraOptionenumerationEnumerated type that specifies extra options available in a database grid.
TDbGridExtraOptionssetTDbGridExtraOptions is a set of values from the TDbGridExtraOption enumeration.
TDBGridOptionenumerationEnumerated type containing options available for use in a database grid control.
TDbGridOptionssetStores values from the TDbGridOption enumeration.
TDbGridSelEditorEventprocedure typeSpecifies an event handler used to select a cell editor in a database grid.
TDbGridStatussetSet type used to store TDbGridStatusItem enumeration values.
TDbGridStatusItemenumerationEnumerated type with values for status messages used in a database grid.
TDrawColumnCellEventprocedure typeSpecifies an event handler for drawing a cell in a grid control.
TFocusControlEventprocedure typeEvent handler signalled to coordinate Field selection and control focus.
TGetDbEditMaskEventprocedure typeSpecifies an event handler used to get the Edit Mask for a cell in a grid.
TMovedEventprocedure typeSpecifies an event handler signalled when the display order of rows or columns is changed.
TPrepareDbGridCanvasEventprocedure typeSpecifies an event handler which prepares the canvas for drawing a database grid.

Constants

DEFINDICATORCOLWIDTHconstantDefault width for the row indicator column in a grid control.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.