怎样向StringGrid中增加新信息?

解决方案 »

  1.   

    stringgrid.rowcount:=stringgrid.rowcount+1;就在最后多了一行
      

  2.   

    stringgrid.cell[2,3].asstring:=edit1.text;
      

  3.   

    更正:stringgrid1.Cells[2,3]:=edit1.text;
      

  4.   

    设置StringGrid1.Options中goEditing为True就可以手动写入了
      

  5.   

     sg_storage.Cells[3,i]:=adoq_count.FieldByName('F5').AsString ;
          sg_storage.Cells[4,i]:=adoq_count.FieldByName('F4').AsString ;
      

  6.   

    随便给你个例子 你可能会用到循环:StringGrid1.Cells[0,0]:='TestData';
    for i:=1 to StringGrid1.ColCount -1  do
    StringGrid1.Cells[i,0]:=ArrayName[i];
    for i:=1 to StringGrid1.RowCount -1 do
    StringGrid1.Cells[0,i]:=InttoStr(i+7)+':00';