list view items not selecting manually

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

ok... how in the world do you get a list view item in detailed view to
manually select? I have tried this

Me.lstvJouranlEntries.Items(Me.lstvJouranlEntries.Items.IndexOf(lvItem)).Selected
= True



but when you do that, it is not visibly selected on screen, and does not
return a item when accessing the selecteditems collection to get the
selected items back... I found a site that kind of talks about this



http://www.devfish.net/FullBlogItemView.aspx?BlogId=59



but it is pretty vague on what to do, it says

lvItems.Items(3)
lvItems.Select()

but of course that is also bad code, you cant just do a items(index) method
with nothing else like that... what do you have to do to visibly select an
item on screen?
 
Brian,

An example of selecting a listview item in code:

ListView1.Items(1).Selected = True
ListView1.Select()

Kerry Moorman
 
that unfortinuatly does not work for me, the list view still has no items
visibly selected on screen
 
Brian Henry said:
that unfortinuatly does not work for me, the list view still has no
items visibly selected on screen


Maybe you set it's HideSelection property = false and the list view does not
have the focus.

Armin
 
humm, got it working now thanks

Armin Zingler said:
Maybe you set it's HideSelection property = false and the list view does
not have the focus.

Armin
 

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