delphi dbgrid 知道字段名如何知道是第几列
for i:=0 to dbgrid1.columns.count do
if dbgrid1.columns[i].caption:='字段bai名duzhi' then
begin
x:=i; //第daoi列
break;
end;
好的代码像粥一样,都是用时间熬出来的
for i:=0 to dbgrid1.columns.count do
if dbgrid1.columns[i].caption:='字段bai名duzhi' then
begin
x:=i; //第daoi列
break;
end;