Delphi & C++ Builder components library
and Software development
 
 
 

DBTreeView - show master-detail data in tree form

rDBTreeView is database version of standard TreeView component which provides loading datasets values to tree structure and supports editing, item drag & drop moving and many other functions.

Benefits:

  • unlimited number of item definitions and nested levels (property DataItemDefs)
  • item text is defined by any masked string with dataset fields for each item
  • defined image, color and font style for each item, text can be align to columns new
  • allows editing of items with events for batch storing changes to dataset
  • support drag & drop of items in defined levels (also multiselected) including auto scrolling during dragging new
  • support loading items on expand (fast inicialization) and delayed refresh (fast scrolling)
  • object with all details and KeyField + Value is created for each item, so it is easy to find db record for each item and vice versa

Example 1 - list of all companies

  • all company records are loaded on show (MasterDataSource=nil, call rDBTreeView.RefreshData to load)
  • only first level is loaded to speed up inicialization, detail is automatically loaded after item is expanded (LoadFirstLevelOnle=true, Master-Detail datasets is used)
  • DataItemDefs detail - see demo application or video
dbtreeview
Design example in video:
video Definition of items in DBTreeView
video Definition of edit and drag & drop function in DBTreeView

Example 2 - details for selected company

  • details is loaded automatically after Company table is scrolled (MasterDataSource=Company datasource)
  • delayed loading is used to allows fast company scrooling (LoadDataDelay = 150 ms)
  • DataItemDefs detail - see demo application or video
dbtreeview
Design example in video:
video Definition of items in DBTreeView

Detail of one DataItem definition:

dbtreeview

Open documentation page.

Go back