ADOQUERY賦值給StringGrid(50分)

  • 主题发起人 主题发起人 itassist06
  • 开始时间 开始时间
I

itassist06

Unregistered / Unconfirmed
GUEST, unregistred user!
在有多行記錄時怎樣把ADOQUERY賦值給StringGrid在StringGrid中顯示
 
...
open;
if not isempty then
begin
for i:=1 to RecordCount do
begin
StringGrid1.Cells[0,i]:=inttostr(i);
StringGrid1.Cells[1,i]:=trim(fieldbyname('field1').AsString);
...
next;
end;
end;
 
先根据数据多少决定其行和列数!
设标题
每个单元格赋值
它们都是 string型号的!
 
它们都是 string型号的是什么意思
 
ekin的方法应该可以.
 

Similar threads

S
回复
0
查看
720
swish
S
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
926
SUNSTONE的Delphi笔记
S
后退
顶部