Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 06 Dec 2024, 17:12

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 02 Nov 2024, 18:05 
Offline

Joined: 14 Jul 2022, 08:46
Posts: 28
Hi
Pls see the attached file.
In tree View It is possible to control the father node (circle red color) to stop expand the children node .

Best Regards


Attachments:
ehlib.jpg
ehlib.jpg [ 55.16 KiB | Viewed 677 times ]
Top
 Profile  
 
PostPosted: 04 Nov 2024, 10:15 
Offline

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

If you want to prevent a branch from opening when the user clicks the Plus sign, you can use the TMemTableEh.OnRecordsViewTreeNodeExpanding event as follows:

Code:
procedure TForm1.MemTableEh1RecordsViewTreeNodeExpanding(Sender: TObject;
  Node: TMemRecViewEh; var AllowExpansion: Boolean);
begin
  if (Node.Rec.DataValues['ID', TDataValueVersionEh.dvvValueEh] = 3) then
    AllowExpansion := False;
end;


ID is a field in the TMemTableEh table.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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