TTMSFNCDataGridCellHelper Class
Class helper that adds safe down-cast properties to TTMSFNCDataGridCell, eliminating the need for explicit type-checks and casts.
API unit family: TMSFNCDataGridCell
Syntax
TTMSFNCDataGridCellHelper = class
class PASCALIMPLEMENTATION TTMSFNCDataGridCellHelper : public System::TObject
Remarks
The As* properties use checked casts: they raise an exception when the cell is not of the requested class, instead of returning nil. Always test the matching Is* property first. The Is* properties also return True for descendants, so IsCheckBoxCell is True for a TTMSFNCDataGridDataCheckBoxCell.
Examples
if ACell.IsCheckBoxCell then
ACell.AsCheckBoxCell.CommentIndicatorColor := gcRed;
Properties
| Name | Description |
|---|---|
| AsBitmapCell | Returns the cell typed as TTMSFNCDataGridBitmapCell; check IsBitmapCell first. |
| AsButtonCell | Returns the cell typed as TTMSFNCDataGridButtonCell; check IsButtonCell first. |
| AsCheckBoxCell | Returns the cell typed as TTMSFNCDataGridCheckBoxCell; check IsCheckBoxCell first. |
| AsCheckedCell | Returns the cell typed as TTMSFNCDataGridCheckedCell (check box or radio button); check IsCheckedCell first. |
| AsFNCButtonCell | Returns the cell typed as TTMSFNCDataGridFNCButtonCell; check IsFNCButtonCell first. |
| AsNodeCell | Returns the cell typed as TTMSFNCDataGridNodeCell; check IsNodeCell first. |
| AsProgressBarCell | Returns the cell typed as TTMSFNCDataGridProgressBarCell; check IsProgressBarCell first. |
| AsRadioButtonCell | Returns the cell typed as TTMSFNCDataGridRadioButtonCell; check IsRadioButtonCell first. |
| IsBitmapCell | True when this cell is a TTMSFNCDataGridBitmapCell or descendant. |
| IsButtonCell | True when this cell is a TTMSFNCDataGridButtonCell or descendant. |
| IsCheckBoxCell | True when this cell is a TTMSFNCDataGridCheckBoxCell or descendant, including the data-bound variant. |
| IsCheckedCell | True when this cell is a TTMSFNCDataGridCheckedCell, that is any check-box or radio-button cell. |
| IsFNCButtonCell | True when this cell is a TTMSFNCDataGridFNCButtonCell or descendant. |
| IsNodeCell | True when this cell is a TTMSFNCDataGridNodeCell or descendant. |
| IsProgressBarCell | True when this cell is a TTMSFNCDataGridProgressBarCell or descendant, including the data-bound variant. |
| IsRadioButtonCell | True when this cell is a TTMSFNCDataGridRadioButtonCell or descendant, including the data-bound variant. |