IDynamicInstance.Move

Fore Syntax

Move(Element: Integer; TargetElement: Integer; Direction: DimDirection);

Fore.NET Syntax

Move(Element: uinteger; TargetElement: uinteger; Direction: Prognoz.Platform.Interop.Dimensions.DimDirection);

Parameters

Element. Index of dictionary element to be moved.

TargetElement. Index of element to which specified element is moved.

Direction. Variant of new layout of moved element.

Description

The Move method moves specified element.

Fore Example

Executing the example requires a form containing the DimensionTree component with the DimensionTree1 identifier, the UiDimension component with the UiDimension1 identifier and the Button component with the Button1 identifier. Determine the UiDimension1 component as data source for the DimensionTree1 component. Data source for the UiDimension1 component must be MDM table dictionary with set dynamic loading of elements.

The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Dim: IDynamicInstance;
    Element: Integer;
Begin
    Dim := UiDimension1.DimInstance As IDynamicInstance;
    Element := DimensionTree1.FocusedElement;
    // Move selected element to child elements of the first element
    Dim.Move(Element, 0, DimDirection.FirstChild);
End Sub Button1OnClick;

On clicking the Button1 button, element selected by user will be moved to child elements of the first element.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Dimensions;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Dim: IDynamicInstance;
    Element: uinteger;
Begin
    Dim := uiDimensionNet1.DimInstance As IDynamicInstance;
    Element := dimensionTreeNet1.FocusedElement;
    // Move selected element to child elements of the first element
    Dim.Move(Element, 0, DimDirection.ddFirstChild);
End Sub;

See also:

IDynamicInstance