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

listView getting values back

P: n/a
Hi,

First time I am using this control in lieu of a listbox, and I want to be
able to get values and row positions back ... I seem to be able to get the
first col value back using focusitem, but what if I want values from other
cols??

I also may want to find the position of the row selected. In listbox I use
the selectindex, how would i do this in listview?

I'm sure this is all very easy, but unlike other controls which I have used
for many years it seems very hard to find example constructs to follow.

Any help gratefully appreciated.
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ListView has SelectedIndices and SelectedItems collections.

With a listview, a ListViewItem has an "Index" property, so SelectedItems
(0).Index gives you the index of the first selected item.

"Jonesgj" <g@btinternet.com> wrote in message
news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
Hi,

First time I am using this control in lieu of a listbox, and I want to be
able to get values and row positions back ... I seem to be able to get the
first col value back using focusitem, but what if I want values from other
cols??

I also may want to find the position of the row selected. In listbox I use
the selectindex, how would i do this in listview?

I'm sure this is all very easy, but unlike other controls which I have
used for many years it seems very hard to find example constructs to
follow.

Any help gratefully appreciated.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.