Skip to main content

TdxSpreadSheetCell Class

A logical cell designed to store, arrange, and process data within a Table View worksheet.

Declaration

TdxSpreadSheetCell = class(
    TdxDynamicListItem,
    IdxSpreadSheetCellData,
    IdxSpreadSheetCellStyleOwner
)

Remarks

The cell object concept was designed to reduce the control’s memory consumption. A newly created blank Table View worksheet has no cell objects. A TdxSpreadSheetCell object is created on demand and stores both the cell data (whether it is a value, formula expression, or an error code) and accompanying custom cell appearance and behavior settings.

The TdxSpreadSheetCell class extends its ancestor with the following members that allow you to:

  • Assign the value of a specific type to the cell object or convert its current value to the required type (AsBoolean, AsCurrency, AsDateTime, AsFloat, AsFormula, AsInteger, AsString, and AsVariant);

  • Replace the current cell value with a formatted RTF string (SetAsRTF);

  • Retrieve formatted text from the cell object (GetAsRTF);

  • Identify whether the cell object has a value (HasValue);

  • Identify the type of data currently stored within the cell object (DataType);

  • Customize appearance and behavior of the cell object (Style);

  • Move the cell object to the specified location within the Table View worksheet (Column, ColumnIndex, Row, and RowIndex);

  • Obtain a reference to the cell object for the use in formula expressions and defined names (GetReference);

  • Remove the stored value from the cell object (IsEmpty and Clear);

  • Obtain the Table View worksheet to which the cell object belongs (View).

Spreadsheet controls create a TdxSpreadSheetCell object when:

  • A user assigns a new value via an in-place cell editor or an associated formula bar;

  • Customizes an empty cell’s appearance.

To create a cell object, you can:

The TdxSpreadSheetTableView.Cells and TdxSpreadSheetTableItem.Cells properties reference a TdxSpreadSheetCell object.

Refer to the Cells and Cell Objects topic for more details.

Inheritance

See Also