I have a grid that has decided to add .00 to all columns that contain only numbers, such as a customer ID number or a US Zip code (postal code). It is the grid that is doing this on it's own. I had this problem once before, but don't remember how I solved it. I do have one column that contains real numeric values, but that's common for most of my grids. And, the rest of them aren't doing this.
There must be a way to tell the grid that these are not really numbers.
Thanks, Bob
I have exactly the same problem. I tried to assign by Grid.Cells[col,row] := xxx, I tried OnGetFloatFormat with all for me possible solutions, no way, e.g. my customer ID is always 444,00 instead of '000444', idem with other "strings" composed only of numbers.
Was retested with a default grid on the form and the code
procedure TForm5.AdvStringGrid1GetFloatFormat(Sender: TObject; ACol,
ARow: Integer; var IsFloat: Boolean; var FloatFormat: string);
begin
IsFloat := false;
end;
procedure TForm5.FormCreate(Sender: TObject);
begin
advstringgrid1.Cells[1,1] := '000444';
end;
and this works without any issue.