stringgrid 控件 rowcount 的问题!
procedure TForm1.Button1Click(Sender: TObject);
begin
stringgrid3.RowCount:=stringgrid3.RowCount+1;
stringgrid3.Cells[0,stringgrid3.RowCount]:=adoquery1.fieldbynam('SPMC').AsString;
stringgrid3.Cells[1,stringgrid3.RowCount]:=adoquery1.fieldbyname('DW').AsString;
stringgrid3.Cells[2,stringgrid3.RowCount]:=edit21.Text;
stringgrid3.Cells[3,stringgrid3.RowCount]:=edit22.Text;
stringgrid3.Cells[4,stringgrid3.RowCount]:=inttostr(j);
end;
end.
我想实现 点击按钮 增加行 然后赋值, 但是 rowcount 不能为0,这让我不知道怎么办了!谁知道怎么解决麻烦给我说下!