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

TCustomDBGrid.Options

Enables or disables optional features or behaviors in the grid control.

Declaration

Source position: dbgrids.pas line 520

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:

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

Changing value(s) in Options causes other aspects of the grid control to be updated to reflect change(s) to the property. ChangedOptions is updated to reflect the enumeration values added or removed in the request. Some enumeration values force other features or behaviors to be disabled. 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. Finally, 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.

#lcl.grids.TGridOptions

  

Set type used to store enabled grid options.

#lcl.grids.TGridOption

  

Represents grip option values available for grid controls.

#lcl.grids.TGridOptions2

  

Set type used to store enabled grid options from TGridOption2.

#lcl.grids.TGridOption2

  

Represents grid options introduced in Version 2 of grid controls.