DeleteNodes(Nodes: Array; DeleteFacts: Boolean);
Nodes - elements array of the MetaAttributesTreeList component.
DeleteFacts - determines whether to delete indicators corresponding to component elements from database. True - to delete; False - not to delete.
The DeleteNodes method deletes 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 set up to work with any time series database.
Click the button to start executing the 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 deleted from the component, their corresponding indicators are deleted from the time series database.
See also: