TTMSFNCDataGridData.ValueToFloat Method
Converts a cell value to a floating-point number using the default format settings. Never raises an exception.
API unit family: TMSFNCDataGridData
Declaring type: TTMSFNCDataGridData
Overloads
Overload 1
Converts a cell value to a floating-point number using the default format settings. Never raises an exception.
class function ValueToFloat(AValue: TTMSFNCDataGridCellValue): Double; overload;
__classmethod double __fastcall ValueToFloat(const TTMSFNCDataGridCellValue &AValue)/* overload */;
Parameters
| Name | Description |
|---|---|
AValue |
Cell value to convert. |
Returns
The number; Booleans give 0 or 1, and empty or unparsable values give 0.
Overload 2
Converts a cell value to a floating-point number, parsing text with the supplied format settings. Never raises an exception.
class function ValueToFloat(AValue: TTMSFNCDataGridCellValue; AFormatSettings: TFormatSettings): Double; overload;
__classmethod double __fastcall ValueToFloat(const TTMSFNCDataGridCellValue &AValue, const System::Sysutils::TFormatSettings &AFormatSettings)/* overload */;
Parameters
| Name | Description |
|---|---|
AValue |
Cell value to convert. |
AFormatSettings |
Locale settings used to parse numeric text, for example the decimal separator. |
Returns
The number; Booleans give 0 or 1, and empty or unparsable values give 0.