ListView SelectedIndexChanged event..
Hi Frineds,
I have tiny problem in my VB.NET application.
I want selected Item Index No. in SelectedIndexChanged event.
code is herebelow:
------------
Private Sub lstvw_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstvwGO.SelectedIndexChanged
MsgBox(lstvwGO.Items.IndexOf(lstvwGO.SelectedItems.Item(0)))
End Sub
------------------
I get value ONCE, but after I get error
---------
Specified argument was out of the range of valid values.
---------
well, there are goo enough data in ListView on which I am clicking..
what could be the prob..
thanks a lot,
-nanc
Re: ListView SelectedIndexChanged event..
If you want the index of the selected item(s) then use the SelectedIndex or SelectedIndices property.