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

TCustomDBGrid.Options

Contains the optional features or behaviors that are enabled for the grid control.

Declaration

Source position: dbgrids.pas line 519

protected property TCustomDBGrid.Options : TDbGridOptions
  read FOptions
  write SetOptions
  default [dgColumnResize, dgColumnMove, dgTitles, dgIndicator, dgRowLines, dgColLines, dgConfirmDelete, dgCancelOnExit, dgTabs, dgEditing, dgAlwaysShowSelection];

Description

Options is a TDBGridOptions property that specifies features or behaviors that can be enabled or disabled by values stored in the property. Please note that these options are different than the TGridOption values used in the ancestor class. Options can contain zero (0) or more values from the TDBGridOption enumeration.

Options contains the following default values when the control is created:

One value commonly included in Options is dgDisplayMemoText. This allows memo fields (those using the ftMemo data type) to display their actual content instead of the '(Memo)' string literal.

See TDBGridOption for more information about values in the enumeration and their meanings.

Changing value(s) in Options may cause other values in the set to be removed. For instance: row selection. Enabling row selection forces the options for editing, always displaying the editor, and row highlighting to be removed from the Options property.

New values assigned to the property may cause other aspects of the grid control to be updated to reflect the change(s). For example, removing multi-selection from the Options property forces the SelectedRows property to be cleared.

The TDBGridOption values stored in Options are different than the TGridOption values used in the ancestor class. As a result, SetOptions (the write access specifier) must translate any TDBGridOption values to their TGridOption equivalents and store them in the inherited Options property.

See also

TDBGridOptions

  

Stores values from the TDbGridOption enumeration.

TDBGridOption

  

Enumerated type containing options available for use in a database grid control.

TGridOptions

  

Set type used to store enabled grid options.

TGridOption

  

Represents grid option values available for grid controls.

TGridOptions2

  

Set type used to store enabled grid options from the TGridOption2 enumeration.


Version 3.2 Generated 2024-02-25 Home