FMX.Grid.TStringGridModel
Delphi
TStringGridModel = class(TGridModel)
C++
class PASCALIMPLEMENTATION TStringGridModel : public TGridModel
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FMX.Grid.pas FMX.Grid.hpp |
FMX.Grid | FMX.Grid |
Description
Data model for a grid of strings.
When you create a string model, you must pass a presentation object to the constructor. The presentation object owns the model.
Col is the column number of the current cell, and Row is its row number.
Use Cells to read the value of a cell and use Columns to access the columns of the model. You can also use Data and DataSource to access the model data.
Use Options to configure the behavior of your model and use StyledSettings and TextSettings to configure its appearance.
Editing the Model
Use InsertColumn, MoveColumn or RemoveColumn to edit the columns of the model.
Use BeginUpdate and EndUpdate to group several changes to the model as a single change.
Handling User Interaction
The Enabled property determines whether user interaction is enabled or not.
Use ShowEditor to open the cell editor on the current cell (the cell in column Col and row Row) and HideEditor to hide the cell editor. Use SelectCell to change the current cell.
CellReturnAction determines the behavior of the cell editor after the user presses ENTER
on the cell editor.