listView getting values back

  • Thread starter Thread starter Jonesgj
  • Start date Start date
J

Jonesgj

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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top