Discovered two ways:
for count1 := 0 to StringGrid1.RowCount - 1 do
for count2 := 0 to StringGrid2.RowCount - 1 do
begin
if StringGrid1.Cells[3, count1] = StringGrid2.Cells[3, count2] then
begin
ShowMessage(StringGrid1.Cells[3, count1] + ' Found In Row ' + IntToStr(count2));
Break;
end;
end;
The other, less efficient but still useful way using:
for i := 0 to SL.Count - 1 do
begin
ShowMessage(SG.IndexOf(SL.Strings[i])):
// (SG being the StringGrid and SL being a StringList)
end;
or
ShowMessage(SG.IndexOf('Text To Search For')):