Oder so in der Art? (nur hingedaddelt, nicht getestet):
Delphi-Quellcode:
function SeekRecord(Grid: TStringGrid; ColOrder: array of integer;
StrList: array of String): Boolean;
var
i: integer;
j: integer;
begin
result := false;
for i := 1 to Grid.RowCount - 1 do begin
Grid.Row := i;
for j := low(ColOrder) to high(ColOrder) do begin
result := (Grid.Cells[ColOrder[J],I] = StrList[J]);
if not result then break;
end;
if result then break;
end;
ShowMessage(Format('Datensatz %sgefunden',[IfThen(Result,'','nicht ')]));
//GridDeleteRow(Grid, i);
end;