F
fuxin198311
Unregistered / Unconfirmed
GUEST, unregistred user!
当我双击dbgrideh某行时 某列的数据就传到另一窗口里 我的代码是这样的 运行提示地址错误
procedure Tvendor_unit.DBGridEh1DblClick(Sender: TObject);
begin
if dbgrideh1.DataSource.DataSet.IsEmpty then
begin
showmessage('没有数据无法选取');
exit;
end
else
begin
if vendor_list.Showing then
begin
vendor_list.ComboEdit1.Text:=dbgrideh1.Fields[0].AsString ;
close;
end;
if inhouse.Showing then
begin
inhouse.ComboEdit1.Text:=dbgrideh1.Fields[0].AsString ;
close;
end;
end;
end;
procedure Tvendor_unit.DBGridEh1DblClick(Sender: TObject);
begin
if dbgrideh1.DataSource.DataSet.IsEmpty then
begin
showmessage('没有数据无法选取');
exit;
end
else
begin
if vendor_list.Showing then
begin
vendor_list.ComboEdit1.Text:=dbgrideh1.Fields[0].AsString ;
close;
end;
if inhouse.Showing then
begin
inhouse.ComboEdit1.Text:=dbgrideh1.Fields[0].AsString ;
close;
end;
end;
end;