Y
yangjj
Unregistered / Unconfirmed
GUEST, unregistred user!
在EHLIB2.1中的DBGRIDEH中如何实现一条记录或多条记录的复制?
看了例子好象可以的,但在我的程序中却不能实现!谁能解决?我用的是以下代码!
procedure Tjh_main.N1Click(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckCopyAction and (geaCopyEh in EditActions) then
DBGridEh_DoCopyAction(TDBGridEh(ActiveControl),False);
end;
procedure Tjh_main.N2Click(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckPasteAction and (geaPasteEh in EditActions) then
DBGridEh_DoPasteAction(TDBGridEh(ActiveControl),False);
end;
procedure Tjh_main.N4Click(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckDeleteAction and (geaDeleteEh in EditActions) then
DBGridEh_DoDeleteAction(TDBGridEh(ActiveControl),False);
end;
看了例子好象可以的,但在我的程序中却不能实现!谁能解决?我用的是以下代码!
procedure Tjh_main.N1Click(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckCopyAction and (geaCopyEh in EditActions) then
DBGridEh_DoCopyAction(TDBGridEh(ActiveControl),False);
end;
procedure Tjh_main.N2Click(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckPasteAction and (geaPasteEh in EditActions) then
DBGridEh_DoPasteAction(TDBGridEh(ActiveControl),False);
end;
procedure Tjh_main.N4Click(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckDeleteAction and (geaDeleteEh in EditActions) then
DBGridEh_DoDeleteAction(TDBGridEh(ActiveControl),False);
end;