Solved

How to select a row in Listview

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

11 Experts available now in Live!

Get 1:1 Help Now