Update cookies preferences
Promotic

GetItemIndex - method of the PmfTreeItem object

Description:
Returns the index of the tree item.
Syntax:
Long GetItemIndex([Long nType], [Variant vPar])
Parameters:
nType[optional] (Long) Specifies whether the method returns the index of the specific item or its subitem.
0 (default) - Returns the index of the specific tree item. The vPar parameter must be null.
1 - Returns the index of the subitem of specific tree item. In the vPar parameter, the identifier of the requested subitem is entered. If the subitem is not found then it returns the -1 value.
vPar[optional] (Variant) The value entered here depends on the setting of the value of the nType parameter.
Note:
This method is also functional in Web panels.
 
The index of the root tree item is always 0.
Example:
JavaScriptSelect and copy to clipboard

var nIndex1 = oTreeItem.GetItemIndex();   // The index of the oTreeItem
var nIndex2 = oTreeItem.GetItemIndex(1, "SubItId");   // The index of the subitem with SubItId identifier

History:
Pm9.00.26: Created
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.