Delphi TFloatField.DisplayFormat for numeric fields less than 1.0
问题 This is my procedure. procedure format_integer_field(Atable: TDataSet); var i: integer; begin if Atable.Active then if Atable.FieldCount > 0 then with Atable do begin for i:= 0 to FieldCount-1 do if (Fields[i] is TIntegerField) then begin (Fields[i] as TIntegerField).DisplayFormat := '###,###'; (Fields[i] as TIntegerField).EditFormat := '#'; end else if (Fields[i] is TFloatField) then begin (Fields[i] as TFloatField).DisplayFormat := '###,###.##'; (Fields[i] as TFloatField).EditFormat := '#.#