473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

List View

Ok, Picture this...

I have a List view already fill with data

I want to select one row in the list view with an ID that
i retrieve later on in the process

Basically its:
I have an ID

i want to find that ID in the List view

If its there then selection the whole row

Thanx
El Camino
Nov 20 '05 #1
4 1768
ok i managed to find the row but now i need to select the
row

i tried this but no result

lsvTache.Items(intCount).selected=true
-----Original Message-----
Ok, Picture this...

I have a List view already fill with data

I want to select one row in the list view with an ID that
i retrieve later on in the process

Basically its:
I have an ID

i want to find that ID in the List view

If its there then selection the whole row

Thanx
El Camino
.

Nov 20 '05 #2
well, the whole thing was workin at the beginning.

I had to set the list view property:

HiddenSelection=false
-----Original Message-----
Ok, Picture this...

I have a List view already fill with data

I want to select one row in the list view with an ID that
i retrieve later on in the process

Basically its:
I have an ID

i want to find that ID in the List view

If its there then selection the whole row

Thanx
El Camino
.

Nov 20 '05 #3
Set HideSelection to False on the list view..

this threw me off the first time.

-CJ
<an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
ok i managed to find the row but now i need to select the
row

i tried this but no result

lsvTache.Items(intCount).selected=true
-----Original Message-----
Ok, Picture this...

I have a List view already fill with data

I want to select one row in the list view with an ID that
i retrieve later on in the process

Basically its:
I have an ID

i want to find that ID in the List view

If its there then selection the whole row

Thanx
El Camino
.

Nov 20 '05 #4
* "El Camino" <an*******@discussions.microsoft.com> scripsit:
I have a List view already fill with data

I want to select one row in the list view with an ID that
i retrieve later on in the process

Basically its:
I have an ID

i want to find that ID in the List view

If its there then selection the whole row


Set the 'ListViewItem''s 'Selected' property to 'True'. If the
selection should even be visible if the control doesn't have the focus,
set it's 'HideSelection' property to 'True'. Or do you have problems
locating the item with #n in the listview control?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Yuki | last post by:
I am trying to find out if I can have a specific record that has been selected in a list box be opened in datasheet view. I can't seem to find where this can happen or what I need to use to make...
4
by: Jeremy Ames | last post by:
I am trying to add info into a list box but I am having problems. I am trying to load the information into a tabular format within the list box, but when I try to space everything out, I get...
11
by: Brian Henry | last post by:
Well here is the problem, I have a data set with about 9,000 to 20,000 people in it in the data table "people"... I am then reading it into a list view one at a time row by row... adding each...
0
by: Brian Henry | last post by:
Since no one else knew how to do this I sat here all morning experimenting with this and this is what I came up with... Its an example of how to get a list of items back from a virtual mode list...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
3
by: Brian Henry | last post by:
So what is the easiest way to do this? I have one list view with a list of items (in detail view and with about 20 sub items) and a second list view that will take the items they drag from the...
2
by: probashi | last post by:
Hi, Using the SqlDataSource/SelectParameters/ControlParameter one can easily bind a Grid View with a list box (or any other controls), pretty cool, but my list box is multi select. My...
5
by: zefciu | last post by:
Hi! I want to embed a function in my python application, that creates a two-dimensional array of integers and passes it as a list (preferably a list of lists, but that is not necessary, as the...
3
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
I've a multiview with 3 views. on view 2 the user is presented with a check box list (items from database) at view 3 the user can review their selections and, either post to the database or go back...
2
by: Mohit | last post by:
Hi all, I am working on a windows application with a list view on a form. Now I wanted to show hand cursor when mouse is over list view item and default(arrow) cursor at other places. List...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.