Skip to main content
Table of Contents

TTMSFNCDataGrid.ValueToFloat Method

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

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

Overloads

Overload 1

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

FMX.TMSFNCDataGrid.hppPascalC++
function ValueToFloat(AValue: TTMSFNCDataGridCellValue): Double; overload;
double __fastcall ValueToFloat(const TTMSFNCDataGridCellValue &AValue)/* overload */;

Parameters

Name Description
AValue The cell value to convert.

Returns

The numeric value; Booleans convert to 0 or 1, strings are parsed; 0 for empty or unparsable values.

Overload 2

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

FMX.TMSFNCDataGrid.hppPascalC++
function ValueToFloat(AValue: TTMSFNCDataGridCellValue; AFormatSettings: TFormatSettings): Double; overload;
double __fastcall ValueToFloat(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 (decimal separator).

Returns

The numeric value, or 0 for empty or unparsable values.