Class TrDBTreeView
Unit
rDBTreeView
Declaration
type TrDBTreeView = class(TTreeView)
Description
database version of standard TTreeView component which provides function for loading datasets values to tree structure.
Hierarchy
Overview
Methods
Properties
Description
Methods
|
constructor Create(AOwner: TComponent); override; |
|
|
procedure EndUpdate; virtual; |
|
|
procedure DragDrop(Source: TObject; X, Y: integer); override; |
|
|
function GetSelectedData: TNodeObject; |
return datastructure for selected node, Node.Data can be used too
|
|
function GetNodeData(NodeAbsoluteIndex: integer): TNodeObject; |
return datastructure for node according index, use AbsoluteIndex to get Node index
|
|
procedure ProcessAllItems(UseChanged, UseMoved: boolean; CallBackProc: TTVChangedEvent; ResetState: boolean); |
go through all items and call CallBackProc for each changed or moved item
|
|
function FindNode(KeyField: TField; KeyValue: variant): TTreeNode; |
try to find node according KeyField and value
|
|
procedure RefreshData(Delayed: boolean = false; KeepSelectedNode: boolean = false); |
reload all nodes
|
|
procedure RefreshNode(Node: TTreeNode); |
reload text of node, it uses current record, so dataset must be moved to correct record before calling
|
|
procedure CreateChildNodes(ParentNode: TTreeNode; MultilevelNode, RemoveCurrentNodes: boolean); |
create child nodes, it uses current dataset records, so number of items is defined by dataset
|
|
procedure CreateSiblingNode(SiblingNode: TTreeNode); |
create child nodes, it uses current dataset records, so number of items is defined by dataset
|
Properties
|
property MasterDataSource: TDataSource read GetMasterDataSource write SetMasterDataSource; |
define datasource used for automatic loading of data
|
|
property DataItemDefs: TDataItemDefs read FDataItemDefs write SetDataItemDefs; |
define collection of DataItemDefinition
|
|
property DataItemDesignTime: boolean read FDataItemDesignTime write SetDataItemDesignTime default true; |
define whether data items is shown in design time and stored to DFM as items
|
|
property LoadFirstLevelOnly: boolean read FLoadFirstLevelOnly write FLoadFirstLevelOnly default false; |
define whether only first level of items is loaded and child data is loaded after expand of item
|
|
property OnItemEdited: TTVChangedEvent read FOnItemEdited write FOnItemEdited; |
event is called after edit text of item
|
|
property OnItemMoved: TTVChangedEvent read FOnItemMoved write FOnItemMoved; |
event is called after drag-and-drop for moved item
|
|
property OnItemObjectDefined: TTVItemObjectDefinedEvent read FOnItemObjectDefined write FOnItemObjectDefined; |
event is called when new node is created and NodeObject is defined
|
|
property LoadDataDelay: cardinal read FLoadDataDelay write FLoadDataDelay default 0; |
define delay before Masterdatasource scroll and loading to treeview
|
Generated by PasDoc 0.15.0.
|