By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,153 Members | 960 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,153 IT Pros & Developers. It's quick & easy.

listview selected item

P: n/a
I can't seem to get howto find the index of the selected item in a listview
(View.Details)....

Thanks in advance,
steve
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> I can't seem to get howto find the index of the selected item in a
listview
(View.Details)....


Try

Dim item1 As ListViewItem = listView1.Items( e.Index )
Nov 20 '05 #2

P: n/a
* "Steve" <sb********@prognote.com> scripsit:
I can't seem to get howto find the index of the selected item in a listview
(View.Details)....


Have a look at the control's 'SelectedIndices' property.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
Hello Steve

With ListView1

For Each MyIndex As Integer In .SelectedIndices

'MyIndex will contain an index into each selected item

'in your listview

Next

End With


--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================
Pocket PC Return On Investment Calculator
Free Download http://64.78.34.175/mcsnet/kwickKalk1.aspx
"Steve" <sb********@prognote.com> wrote in message
news:b1********************@bgtnsc05-news.ops.worldnet.att.net...
I can't seem to get howto find the index of the selected item in a listview (View.Details)....

Thanks in advance,
steve

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.