Solved

How to select a row in Listview

Posted on 2006-06-14
1
163 Views
Last Modified: 2010-04-23
I add a new record to a database as following,
objData.SQL = "usp_InsertCustomer"
objData.InitializeCommand()
'Add the Parameters to the Parameters collection
objData.AddParameter("@Customerid",Data.OleDb.OleDbType.Guid, 16, Guid.NewGuid())
objData.AddParameter("@Firstnamecontact", Data.OleDb.OleDbType.VarChar, 50, txtContactFirstnamecontact.Text)
........

Then fill a Listview, how can I select(highlight) the record I just add? thank you for your help.
0
Comment
Question by:gavvic
1 Comment
 
LVL 2

Accepted Solution

by:
Mystify earned 50 total points
ID: 16901604
ListView1.Items(Index).Selected = True

This is how you select an item, but when you "add" an item, you can get it returned:


dim item as new ListViewItem

item = ListView1.Items.Add(...
item.Selected=true
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now