请大虾 bluesun 进来领分,有哪位大虾可以解决-DBGRIDEH复制粘贴的问题也请进来领 分,谢谢!
bluesun大虾,这是你2005年发布的贴子,现在小弟也迫切需要DBGRIDEH的复制和粘贴功能,能否帮忙将你做好的例子提供一下,小弟的要求很简单,就是可以同时选择多行,然后将其复制,然后可以粘贴到另外一个DBGRIDEH里面,诚心求教,请赐教,谢谢!!!
遇到的问题:环境搭起来了,但就是实现不了复制和粘贴的功能,还有多行选择的问题!
如果有哪位大虾也可以解决这个问题,也请赐教,谢谢!!!
楼主bluesun()2005-06-21 10:15:17 在 Delphi / VCL组件开发及应用 提问
ehlib3中的demo中的代码如下.
procedure TForm1.ppmCutClick(Sender: TObject);
begin
if (ActiveControl is TDBGridEh) then
with TDBGridEh(ActiveControl) do
if CheckCutAction and (geaCutEh in EditActions) then
DBGridEh_DoCutAction(TDBGridEh(ActiveControl),False);
end;
procedure TForm1.ppmCopyClick(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 TForm1.ppmPasteClick(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;
EditActions属性设置一下即可.:)