ListItemID Property

JavaScript Editor js editor     Web development 



Main Page

Specifies the unique ID number for the selected item in a ComboBox or ListBox control. Not available at design time; read/write at run time.

Control.ListItemID[ = nItemID]

Return Value

nItemID


The settings and interpretations for the ListItemID property are:

nItemID Description

0

Indicates that no items are selected.

Note:
For ComboBox controls, the value 0 means that the user has entered a value not in the list.

1 or any number greater than 1

The item ID of the selected item.

The ListItemID property is also set when the SelectedID property on a ListBox control is set.

Remarks

Applies To: ComboBox Control | ListBox Control

If the RemoveListItem method is used to remove an item from a list, all remaining items retain their unique identification numbers. When the AddItem method is used to add an item to a list, and the Sorted property is set to False (.F.), nItemID is assigned the lowest number available. When the AddListItem method is used to add an item to a list, and the Sorted property is set to False (.F.), you can assign any number to nItemID.

See Also



JavaScript Editor js editor     Web development