Vcl.DBGrids.TCustomDBGrid.GetEditStyle
Delphi
function GetEditStyle(ACol, ARow: Longint): TEditStyle; override;
C++
DYNAMIC Vcl::Grids::TEditStyle __fastcall GetEditStyle(System::LongInt ACol, System::LongInt ARow);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | Vcl.DbGrids.pas Vcl.DBGrids.hpp |
Vcl.DBGrids | TCustomDBGrid |
Description
Indicates whether a specified cell has an ellipsis button or drop-down arrow.
GetEditStyle indicates whether the specified cell can only be edited directly (esSimple), whether it has an ellipsis button that users can click to launch an editor for modifying field values (esEllipsis ), or whether it has a drop-down arrow that users can click to display a pick list of possible values (esPickList).
ACol is the column that contains the cell. ARow is the row that contains the cell.
In TCustomDBGrid, GetEditStyle checks the properties of the column object that corresponds to ACol.
If the column has a ButtonStyle of cbsEllipsis or if it has a ButtonStyle of cbsAuto and it represents a dataset or reference field, then GetEditStyle returns esEllipsis.
If the column has a ButtonStyle of cbsAuto, is not read-only, and either has a pick list or represents a lookup field, then GetEditStyle returns esPickList.
If the column has a ButtonStyle of cbsNone or neither of the two previous conditions are met, then GetEditStyle returns esSimple.