Solved

How to select a row in Listview

Posted on 2006-06-14
1
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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