StringGrid不是数据敏感构件,不能构直接连table. 可以自己写一个函数. 思想: 用一个双重循环. for i:=0 to table.recordcount-1 do for j:=0 to table.fields.count-1 do begin stringgrid.cells[j,i]:=table.fields[j].asstring; next; end;
for i:=0 to table.recordcount-1 do for j:=0 to table.fields.count-1 do begin stringgrid.cells[j,i]:=table.fields[j].asstring;
end; next; end;
for i:=0 to table.recordcount-1 do begin for j:=0 to table.fields.count-1 do stringgrid.cells[j,i]:=table.fields[j].asstring; next; end;才对
可以自己写一个函数.
思想:
用一个双重循环.
for i:=0 to table.recordcount-1 do
for j:=0 to table.fields.count-1 do
begin
stringgrid.cells[j,i]:=table.fields[j].asstring;
next;
end;
for j:=0 to table.fields.count-1 do
begin
stringgrid.cells[j,i]:=table.fields[j].asstring;
end;
next;
end;
begin
for j:=0 to table.fields.count-1 do
stringgrid.cells[j,i]:=table.fields[j].asstring;
next;
end;才对