Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / January 2005



Tip: Looking for answers? Try searching our database.

ListView

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barbara - 31 Jan 2005 19:51 GMT
How do you set listview index to a specified index number.

I tried
ListView1.SelectedItem(3) and this is not correct.
Ken Halter - 31 Jan 2005 20:17 GMT
> How do you set listview index to a specified index number.
>
> I tried
> ListView1.SelectedItem(3) and this is not correct.

Here's a couple of ways....
'========
Private Sub Form_Load()
  With ListView1
     Set .SelectedItem = .ListItems(3)
     'or
     Set .SelectedItem = .ListItems(YourKey)
     '
     'then...
     .SelectedItem.EnsureVisible
  End With
End Sub
'========

Signature

Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..

Barbara - 31 Jan 2005 21:59 GMT
Than you
That was exactly what I needed.

Barbara
>-----Original Message-----
>> How do you set listview index to a specified index number.
[quoted text clipped - 15 lines]
>End Sub
>'========
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.