Solved

How to select a row in Listview

Posted on 2006-06-14
1
171 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exit the loop 4 49
VB.net DataGridView show bit field as Text column not CheckBox column 5 18
Convert Ctime to date time in textfile? 7 31
Name Space error VS2015 1 23
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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