method FaceTree.GetItems (Options as Variant)
Gets the collection of items into a safe array,

TypeDescription
Options as Variant Specifies a long expression as follows:
  • if 0, the result is a two-dimensional array with cell's values. The list includes the collapsed items, and the items are included as they are displayed ( sorted, filtered ). This option exports the values of cells. This option exports the values of the cells ( Value property )
  • if 1, the result the one-dimensional array of handles of items in the control as they are displayed ( sorted, filtered ). The list does not include the collapsed items.
  • else if other, and the number of columns is 1, the result is a one-dimensional array that includes the items and its child items as they are displayed ( sorted, filtered ). In this case, the array may contains other arrays that specifies the child items. The list includes the collapsed items, and the items are included as they are displayed ( sorted, filtered ). This option exports the values of the cells ( Value property )

If missing, the Options parameter is 0. If the control displays no items, the result is an empty object (VT_EMPTY).

ReturnDescription
VariantA safe array that holds the items in the control. If the control has a single column, the GetItems returns a single dimension array (object[]), else The safe array being returned has two dimensions (object[,]). The first dimension holds the collection of columns, and the second holds the cells.
The GetItems method to get a safe array that holds the items in the control. The GetItems method gets the items as they are displayed, sorted and filtered. If the Options parameter is 0, the GetItems method collect the child items as well, no matter if the parent item is collapsed or expanded. Use the PutItems method to load an array to the control. The method returns nothing if the control has no columns or items. Use the Items property to access the items collection. You can use the GetItems(1) method to get the list of handles for the items as they are displayed, sorted and filtered. The GetItems method returns an empty expression ( VT_EMPTY ), if there is no items in the result.

/NET Assembly: 

The following C# sample converts the returned value to a object[] when the control contains a single column:

    object[] Items = (object[])extree1.GetItems()

or when the control contains multiple columns, the syntax is as follows:

    object[,] Items = (object[,])extree1.GetItems()

The following VB.NET sample converts the returned value to a Object() when the control contains a single column:

    Dim Items As Object() = Extree1.GetItems()

or when the control contains multiple columns, the syntax is as follows:

    Dim Items As Object(,) = Extree1.GetItems()