Skip to main content
Table of Contents

TTMSFNCDataGrid.ValueToBoolean Method

Converts a cell value to a Boolean without raising an exception.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCDataGrid Inherited from: TTMSFNCCustomDataGrid

Overloads

Overload 1

Converts a cell value to a Boolean without raising an exception.

FMX.TMSFNCDataGrid.hppPascalC++
function ValueToBoolean(AValue: TTMSFNCDataGridCellValue): Boolean; overload;
bool __fastcall ValueToBoolean(const TTMSFNCDataGridCellValue &AValue)/* overload */;

Parameters

Name Description
AValue The cell value to convert.

Returns

True when the value converts to a non-zero integer (numbers are rounded; strings are parsed as integer, float or Boolean text such as 'True'); False otherwise, including for empty or unparsable values.

Overload 2

Converts a cell value to a Boolean using the specified format settings, without raising an exception.

FMX.TMSFNCDataGrid.hppPascalC++
function ValueToBoolean(AValue: TTMSFNCDataGridCellValue; AFormatSettings: TFormatSettings): Boolean; overload;
bool __fastcall ValueToBoolean(const TTMSFNCDataGridCellValue &AValue, const System::Sysutils::TFormatSettings &AFormatSettings)/* overload */;

Parameters

Name Description
AValue The cell value to convert.
AFormatSettings Format settings used to parse floating-point strings.

Returns

True when the value converts to a non-zero integer; False otherwise, including for empty or unparsable values.