NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ListBox.InsertItem

Allows you to add an Item to the ListBox, but in a location you specify, as opposed to the end of the list. Note that if the sorted property is set to "true", values inserted via this method are not property sorted. the addItem method should be used instead.

[Visual Basic]
Public Sub InsertItem( _
   ByVal index As Integer, _
   ByVal item As Object _
)
[C#]
public void InsertItem(
   int index,
   object item
);
[C++]
public: void InsertItem(
   int index,
   Object* item
);
[JScript]
public function InsertItem(
   index : int,
   item : Object
);

Parameters

index
Where in the list [zero-based] it should be inserted.
item
The value of the item you want inserted

Return Value

the index at which it was inserted [this can be different from the requested index in sorted listboxes, etc.]

See Also

ListBox Class | ListBox Members | System.WinForms Namespace