DeleteNodes(Nodes: Array; DeleteFacts: Boolean);
Nodes is an elements array of the MetaAttributesTreeList component.
DeleteFacts determines whether to remove factors, that correspond to component elements, from DB. True - to remove; False - not to remove.
The DeleteNodes method removes the specified elements from the component. Deletion is always executed recursively.
Executing the example requires a form with a button with the Button1 identifier, the MetaAttributesBreadcrumb component and the MetaAttributesTreeList component named MetaAttributesTreeList1. These components are configured to work with any time series database.
Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
SelNodes: Array;
Begin
SelNodes := MetaAttributesTreeList1.GetSelectedNodes;
MetaAttributesTreeList1.DeleteNodes(SelNodes, True);
End Sub Button1OnClick;
After executing the example, the highlighted elements are removed from the component, their corresponding factors are removed from the time series database.
See also: