MovePrevElement method (ILEADDicomDS)

VB.NET example

C# example

Visual Basic example

Visual C++ 6.0 example

 

Syntax

short MovePrevElement ( BOOL bTree );

Overview

Refer to Working with Data Sets.

Remarks

Updates the CurrentElement property with the item in the Data Set that immediately precedes the item specified in the CurrentElement property. The result depends on whether the Data Set is evaluated as a tree or a list.

If the Data Set is evaluated as a tree structure, this method updates the CurrentElement property with the previous item on the same level and with the same parent as the item specified in the CurrentElement property. Please note that the numbering of the items in this illustration is arbitrary and does not imply order.

image\GetPvTr.gif

If the CurrentElement property contains:

The CurrentElement property will be updated with:

Item 1

Item 2

Item 3

Item 4

Item 5

NULL

Item 6

Item 7

If the Data Set is evaluated as a list, the CurrentElement property is updated with the previous item in the list. Please note that the numbering of the items in this illustration does indicate the order of the items when the Data Set is evaluated as a list.

image\GetPvLst.gif

If the CurrentElement property contains:

The CurrentElement property will be updated with:

Item 1

NULL

Item 15

Item 14

Item 5

Item 4

Item 9

Item 8

Item 22

Item 21

Item 25

Item 24

The following methods will also help you navigate the Data Set as either a tree or a list:

MoveFirstElement method

MoveLastElement method

MoveNextElement method

If you evaluate the IOD Structure as a tree, you can also use the following methods to navigate the tree:

MoveRootElement method

MoveParentElement method

MoveChildElement method

Note: Visual Basic users can either check the return value of the method, or capture and process errors to determine whether the MovexxxElement methods have completed successfully. For an example of capturing errors, refer to any of the MovexxxElement method examples.

See Also

Elements:

MoveFirstElement method, MoveLastElement method, MoveNextElement method, MoveRootElement method, MoveParentElement method, MoveChildElement method

Topics:

Data Sets: Maneuvering Through a Data Set