From 939425dc193b445b7089ef94db47eadd28089720 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 20 Mar 2010 00:03:34 +0000 Subject: [PATCH] Do cell text formatting for decimal and binary columns, also in DataGridEnsureFullRow(). Fixes issue #1784. --- source/main.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index 59d5c9b5..6a7a5307 100644 --- a/source/main.pas +++ b/source/main.pas @@ -3411,7 +3411,11 @@ begin if Data.RecordCount = 0 then raise Exception.Create('Unable to find row.'); for i:=0 to Length(DataGridResult.Columns)-1 do begin - Row.Cells[i].Text := Data.Col(i); + case DataGridResult.Columns[i].DatatypeCat of + dtcInteger, dtcReal: Row.Cells[i].Text := FormatNumber(Data.Col(i), False); + dtcBinary: Row.Cells[i].Text := GetBlobContent(Data, i); + else Row.Cells[i].Text := Data.Col(i); + end; Row.Cells[i].IsNull := Data.IsNull(i); end; Row.HasFullData := True;