我这样写的:
StringGrid1.Rows[i].Delete[i];
可是编译不过去的:(
请教各位高手了
谢谢
StringGrid1.Rows[i].Delete[i];
可是编译不过去的:(
请教各位高手了
谢谢
解决方案 »
- 怎样用键盘控制DBRadioGroup选项
- Windows系统时间问题,有趣!大家进来谈谈。
- 大家,代码没有错,但是出现了下面的问题,该怎么调呢?
- 关于网卡MAC地址的,跟是否插上网络线有关?
- 怎样知道鼠标在Cattion上点击了?(想用自己画的最大、最小化按钮)
- 使用format算出的数怎么不准呢?
- ********对VCL熟悉的高手请进——有点难度的问题:如何在不移动记录指针的情况下得到DBGridEh某个指定单元格的值**********
- 数据库主键冲突的异常捕获问题,急。
- 关于MIDAS的可迁移性问题
- 有人用过imgscan做过程序吗?,能帮我一下吗/
- 为什么我的程序无法在没有装delphi的电脑上运行
- Delphi中数据库连接相关
var i: Integer;
st: TStringList;
begin
st := TStringList.Create;
for i:=0 to StringGrid1.ColCount-1 do begin
st.Assign(StringGrid1.Cols[i]);
st.Delete(StringGrid1.Row);
StringGrid1.Cols[i].Assign(st);
end;
StringGrid1.RowCount := StringGrid1.RowCount-1;
st.Free;
end;(注:削除当前行)
procedure GridDeleteRow(RowNumber: Integer; Grid: TstringGrid);
var
i: Integer;
begin
Grid.Row := RowNumber;
if (Grid.Row = Grid.RowCount - 1) then
{ On the last row}
Grid.RowCount := Grid.RowCount - 1
else
begin
{ Not the last row}
for i := RowNumber to Grid.RowCount - 1 do
Grid.Rows[i] := Grid.Rows[i + 1];
Grid.RowCount := Grid.RowCount - 1;
end;
end;