Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 14 Apr 2024, 05:17

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 22 Feb 2024, 08:44 
Offline

Joined: 14 Jul 2022, 08:46
Posts: 22
Hi

I want to display the nodes that have TreeNodeChildCount=0 from the treeview(see the pict).
I tried to use Memtable1.Filter := TreeNodeChildCount=0 not work.

Regards


Attachments:
ehlib_tree.jpg
ehlib_tree.jpg [ 77.37 KiB | Viewed 441 times ]
Top
 Profile  
 
PostPosted: 23 Feb 2024, 09:21 
Offline

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

1. The Memtable1.Filter property must contain a string expression.
2. The Memtable1.Filter property can contain only the names of the DataSet fields as variable values.

In your case, to display Nodes that do not have Child elements, you need to use the Memtable1.OnFilterRecord event and
the following expressions for the event handler:

Code:
procedure TForm1.MemTableEh1FilterRecord(DataSet: TDataSet;
   var Accept: Boolean);
begin
   if MemTableEh1.RecView.NodeHasChildren then
     Accept := True
   else
     Accept := False;
end;

_________________
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 1 guest


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