InsertElement method

Delphi example

C++Builder example

 

Builder Syntax

int __fastcall InsertElement(bool bChild, Cardinal uTag, Word nVR, bool bSequence, Cardinal uIndex);

Delphi Syntax

function InsertElement(bChild: Boolean; uTag: Cardinal; nVR: Word; bSequence: Boolean; uIndex: Cardinal): Integer;

Overview

Refer to Working with Data Sets.

Remarks

Inserts a new item in the Data Set, based on the value of bChild. If the element is successfully inserted, the CurrentElement property will be updated with the new item.

The illustrations below show how items are added to the Data Set (internally maintained as a tree), based on the value of bChild.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore, since added items become the last sibling or the last child, these are drawn at the bottom of the appropriate group of items.

In this illustration, the CurrentElement property contains Item 1 and bChild is False. The new item is added as the last sibling of Item 1.

image\IODIsSib.gif

In this illustration, the CurrentElement property contains Item 1 and bChild is True. The new item is added as the last child of Item 1.

image\IODIsChd.gif

See Also

Elements:

DeleteElement method