ar gr1:tstringgrid;


procedure TForm1.Button1Click(Sender: TObject);
var x, y, z:integer;
tmpstr : array[0..100] of string;
begin
  with gr1 do
  begin
    for x:= 1 to rowcount -1 do
    for y := 1 to rowcount-x do
      if strtoint(cells[1, y]) > strtoint(cells[1, y+1]) then
        for z := 0 to colcount-1 do
        begin
            tmpstr[z] := cells[z,y];
            cells[z,y] := cells[z, y+1];
            cells[z, y+1] := tmpstr[z];
         end;
   end;
end;

strtoint
strtofloat
strtodatetime

ansicomparestr
ansicomparetext

àâä = a
éèêë = e
îï =i
ôö = o
ùûü = u