procedure TForm.DBGridDrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
var
temp:string;
begin
with DBGrid.Canvas do
begin
FillRect(Rect);
if (Field.DataType = ftFloat) then
begin
if not (Field.IsNull) then temp:= format('%8.1f',[strtofloat(field.asstring)]);
TextOut(Rect.Right-TextWidth(temp)-3,Rect.Top+3, temp);
end
else TextOut(Rect.Left+2,Rect.Top+3,Field.AsString);
end;
end;