Vcl.DBGrids.TDBGridOption
Delphi
TDBGridOption = (dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator,
dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect,
dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect,
dgTitleClick, dgTitleHotTrack);
C++
enum DECLSPEC_DENUM TDBGridOption : unsigned char { dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect, dgTitleClick, dgTitleHotTrack };
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
enum | public | Vcl.DbGrids.pas Vcl.DBGrids.hpp |
Vcl.DBGrids | Vcl.DBGrids |
Description
TDBGridOption and TDBGridOptions indicate display and behavioral property of a DB grid.
TDBGridOptions is a set drawn from the TDBGridOption values listed in the following table. The default value for all the options is True (Enabled).
Value | Meaning |
---|---|
dgEditing |
The user can edit, insert, and delete records in the grid. Ignored if Options includes dgRowSelect. |
dgAlwaysShowEditor |
The grid is always in edit mode. That is, when a user selects a field, the field is in Edit state. The user does not have to press ENTER or F2 before editing the contents of a cell. Does nothing unless dgEditing is also included in Options. Is ignored if Options includes dgRowSelect. |
dgTitles |
Titles appear at the top of the columns in the grid. |
dgIndicator |
The indicator column is displayed at the left of the grid and a small pointer appears in the indicator column to indicate the current row. The current record indicator is an arrow. On insert, the arrow becomes an asterisk. On edit, the arrow becomes an I-beam. |
dgColumnResize |
Columns that are bound to fields can be resized or moved. A user can resize a column by dragging the column rulers in the title area. Resizing changes the corresponding width of the underlying TField component. |
dgColLines |
Displays vertical dividing lines between columns. |
dgRowLines |
Displays horizontal dividing lines between columns. |
dgTabs |
The user can navigate through the grid using the TAB and SHIFT+TAB keys. |
dgRowSelect |
Enables tabbing between fields in records. A user can select an entire row and, as well, individual cells. If Options includes dgRowSelect, both dgEditing and dgAlwaysShowEditor are ignored. |
dgAlwaysShowSelection |
The selected cell displays the focus rectangle even when the grid does not have focus. |
dgConfirmDelete |
A message box appears, asking for confirmation, when the user presses |
dgCancelOnExit |
When the user exits the grid from an inserted record to which no modifications were made, the inserted record is not posted to the dataset. This prevents the inadvertent posting of partial or empty records. |
dgMultiSelect |
Allows the user to select noncontiguous rows in the grid using |
dgTitleClick |
Allows clicking in the table header cells. |
dgTitleHotTrack |
Table header cells are hot-tracked. Specifies that list items are highlighted when the mouse passes over them. See Vcl.ComCtrls.TCustomListView.HotTrack for more information |