Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 22:27

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 28 Sep 2022, 18:11 
Offline

Joined: 15 Mar 2021, 16:33
Posts: 37
Hi

How to click the edit button in dbgridEh (se the pict) using delphi code instead using click mouse.

Best Regards


Attachments:
ehlib.jpg
ehlib.jpg [ 75.43 KiB | Viewed 1714 times ]
Top
 Profile  
 
PostPosted: 06 Oct 2022, 09:07 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello redsea71

Try this code:


Code:
type
  TDBAxisGridInplaceEditCrack = class(TDBAxisGridInplaceEdit);

procedure TfrMainGrid.SpeedButton1Click(Sender: TObject);
begin
  if not DBGridEh1.EditorMode then
    DBGridEh1.EditorMode := True;
  TDBAxisGridInplaceEditCrack(DBGridEh1.InplaceEditor).DropDown;
end;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 09 Oct 2022, 13:47 
Offline

Joined: 14 Jul 2022, 08:46
Posts: 22
I tried. it is not working (do nothing).


Top
 Profile  
 
PostPosted: 10 Oct 2022, 08:29 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Please write in what environment you tested.
We tested in the standard Demo project <EhLib Archive>\Demos\MainDemo\
EhLib.VCL 10.2 Build 10.2.033

Place a SpeedButton on a TfrMainGrid frame and write the following Click code.

Code:
procedure TfrMainGrid.SpeedButton1Click(Sender: TObject);
begin
  DBGridEh1.SetFocus;
  DBGridEh1.SelectedIndex := 1;
  if not DBGridEh1.EditorMode then
    DBGridEh1.EditorMode := True;
  TDBAxisGridInplaceEditCrack(DBGridEh1.InplaceEditor).DropDown;
end;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 13 Oct 2022, 16:12 
Offline

Joined: 14 Jul 2022, 08:46
Posts: 22
Is Ehlib VCL 10.0.030 work in this case ?


Top
 Profile  
 
PostPosted: 17 Oct 2022, 18:18 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Yes, it works in EhLib 10.0
Try to download last build EhLib.VCL 10.0 Build 10.0.039


Attachments:
sshot-277.png
sshot-277.png [ 72.57 KiB | Viewed 1582 times ]

_________________
Best regards
EhLib Support Team
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group