如上。

解决方案 »

  1.   

    procedure TForm1.Button1Click(Sender: TObject);var
      I, J, K : Integer;
    begin
      K := 0;
      with StringGrid1 do
        for I := 0 to ColCount - 1 do
          for J:= 0 to RowCount - 1 do
            begin
              K := K + 1;
              Cells[I,J] := '';
            end;
    end;
      

  2.   

    实际上 这样就可 很容易 
    var
    i,j:integer;
    begin 
    with stringgrid1 do
     for i:=0 to colcount-1 do
       for j:=0 to rowcount-1 do
       begin
         cells[i,j]:='';
    end; 
      

  3.   

    不用这么麻烦,只要设置一个for循环,对每一行设置clear方法就行,例如:
    stringgrid1.rows[1].clear;