Trouver un champ dans un tableau
bonjour,
voilà, j'affiche un tableau avec des données. La première colonne est celle d'un numéro,la clé. Je voudrais trouvé le maximum de cette colonne.
En fait c'est pour pouvoir incrémenté par la suite...
Voici mon tableau.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
procedure Tvoirconcert.Formactivate(Sender: TObject);
var I:integer;
begin
tablC.Cells[0,0]:='Concert';
tablC.Cells[1,0]:='Groupe';
tablC.Cells[2,0]:='Date';
tablC.Cells[3,0]:='Prix';
tablC.Cells[4,0]:='Concert Complet';
tablC.Cells[5,0]:='Numéro';
for I := 1 to nbconcert do begin
tablC.Cells[5,I]:=inttostr (tabconcert[i].GetNumC());
tablC.Cells[2,I]:= datetostr(tabconcert[i].GetDateC());
tablC.Cells[3,I]:= floattostr(tabconcert[i].GetPrixC());
tablC.Cells[1,I]:= tabconcert[i].GetGroupC();
tablC.Cells[4,I]:= tabconcert[i].ConcertComplet();
end;
end;
end. |
merci