Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to select a row in Listview

Posted on 2006-06-14
1
Medium Priority
?
192 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 100 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

926 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