Hi Dmitry,
Thanks a lot............
Your script works fine for columns 0, 1, 3 and 4.
Problem seems to be handling currency field type with decimals and thousand separator. Column 11 and thereafter filtered columns displays currency field types data. It produces error: " is not a valid floating point value"
procedure SaleTransHist_tgSaleInvTransHist_OnChange (Sender: string);
var
i,c: integer;
sPrevRow: string;
begin
sPrevRow := '';
c := SaleTransHist.tgSaleInvTransHist.RowCount-1;
for i := 0 to c do
begin
if SaleTransHist.tgSaleInvTransHist.Cells[0,i] = sPrevRow then
begin
sPrevRow := SaleTransHist.tgSaleInvTransHist.Cells[0,i];
SaleTransHist.tgSaleInvTransHist.Cells[0,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[1,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[3,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[4,i] := '';
// Columns those are not working
{SaleTransHist.tgSaleInvTransHist.Cells[11,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[12,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[13,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[14,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[15,i] := '';
SaleTransHist.tgSaleInvTransHist.Cells[16,i] := ''; }
end else sPrevRow := SaleTransHist.tgSaleInvTransHist.Cells[0,i];
end;
end;
begin
end.
Adam
God... please help me become the person my dog thinks I am.