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
- 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
- support loading items on expand (fast initialization) 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
- MultiLevel support - allows to load any number of levels from one table (by ParentId field), set MultilevelMode=true and ParentKeyFieldName
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 initialization, detail is automatically loaded after item is expanded
(LoadFirstLevelOnle=true, Master-Detail datasets is used)
- DataItemDefs detail - see demo application or video
Design example in video:
Definition of items in DBTreeView
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 scrolling (LoadDataDelay = 150 ms)
- DataItemDefs detail - see demo application or video
Design example in video:
Definition of items in DBTreeView
Detail of one DataItem definition:
Open documentation page.
Go back