RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDBGrid.GetEditStyle Method

Indicates whether a specified cell has an ellipsis button or drop-down arrow.

Pascal
function GetEditStyle(ACol: Longint; ARow: Longint): TEditStyle; override;
C++
virtual __fastcall TEditStyle GetEditStyle(Longint ACol, Longint ARow);

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!