rt

解决方案 »

  1.   

    設置 TStringGrid 的rowCount, ColCount 為 0就可!
    如果需要, 再設Rowcount, ColCount 為原來的
      

  2.   

    var
      I,J: Integer;
    begin
      for I := 0 to StringGrid1.RowCount - 1 do
        for J := 0 to StringGrid1.ColCount - 1 do
        begin
          StringGrid1.Cells[J,I] := '';
        end;
    end;
      

  3.   

    stringgrid.setfocus := false;
    for I := 0 to stringgrid.ColCount do
     for j:= 0 to stringgrid.rowcount do
    stringgrid.cells[i,j]:= ''
      

  4.   

    aiirii(ari-爱的眼睛)
    照你的提示我测试了一下,有些问题,当再設Rowcount, ColCount 為原來的时候,内容还是存在的、
      

  5.   

    var
      I,J: Integer;
    begin
      for I := 0 to StringGrid1.RowCount - 1 do
        for J := 0 to StringGrid1.ColCount - 1 do
        begin
          StringGrid1.Cells[J,I] := '';
        end;
    end;
    看来只能这样做了
      

  6.   

    StringGrid1.RowCount:=2 
    StringGrid1.ColCount :=2