如何取出dbgrideh选中的多行的数据
展开全部
操销颂作方法如御斗衫下:
var
i,j:integer;
str: string;
Begin
str:='';
for i:=0 to DBgrid1.selectedrows.count-1 do
begin
Gotobookmark(pointer(DBgrid1.selectedrows.ites[i]));
for j:=0 to fieldcount-1 do
Begin
if j>0 then
str:='镇腔,'+str;
str:=fields[i].Asstring;
End;
listbox1.items.add(str);
str:='';
End;
End;
var
i,j:integer;
str: string;
Begin
str:='';
for i:=0 to DBgrid1.selectedrows.count-1 do
begin
Gotobookmark(pointer(DBgrid1.selectedrows.ites[i]));
for j:=0 to fieldcount-1 do
Begin
if j>0 then
str:='镇腔,'+str;
str:=fields[i].Asstring;
End;
listbox1.items.add(str);
str:='';
End;
End;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询