TMS FNC Grid In-place editing issue with float values

I am using a TTMSFNCGrid in a VCL application with in-place editing.
Cells containing float values are rounded to integers when the cell switches to edit mode.

For example, on the following grid, if I set the focus to the cell containing the value 24.5 as below:

Then when I press F2 or enter in edit mode by clicking again the cell, the value is converted to 25 as shown below:

The cell editor is set to etFloatEdit in the grid event OnGetCellEditorType
Also note that my Windows Regional Settings are set to use the dot "." as the decimal separator and
I am currently using TMS FNC UI Pack v3.5.2.1.

I also attached a sample project to be able to reproduce the issue easily. (25.7 KB)



You can set the Precision of the editor with the following code.

procedure TForm1.TMSFNCGrid1GetCellEditorProperties(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl);
  if (CellEditor is TTMSFNCGridEdit) then
    (CellEditor as TTMSFNCGridEdit).Precision := 1;

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.