473,387 Members | 1,578 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,387 software developers and data experts.

Listview selected item

I everyone... I've got a listview (details) ... and i'm trying to unselect
any item selected...

In a combobox, e.g, i can put this:

ComboBox1.SelectedIndex = -1

I want to do this but in a listview control... can anyone help me?

Thanks
--
Tiago Salgado
http://www.foruns.org
Jul 9 '06 #1
3 3588
I've already made it... lol ... i use this code:

listview1.selectedindices.Clear()

On Sun, 09 Jul 2006 16:18:34 +0100, Tiago Salgado <tiagosalgado.developer
wrote:
I everyone... I've got a listview (details) ... and i'm trying to
unselect any item selected...

In a combobox, e.g, i can put this:

ComboBox1.SelectedIndex = -1

I want to do this but in a listview control... can anyone help me?

Thanks



--
Tiago Salgado
http://www.foruns.org
Jul 9 '06 #2
hi,

Try the following option

listview1.items.item(index).selected = false

where index is the item that you want to deselect.pls reply me whether
it works or not.

Thanks,
Ganesh

Tiago Salgado wrote:
I've already made it... lol ... i use this code:

listview1.selectedindices.Clear()

On Sun, 09 Jul 2006 16:18:34 +0100, Tiago Salgado <tiagosalgado.developer>
wrote:
I everyone... I've got a listview (details) ... and i'm trying to
unselect any item selected...

In a combobox, e.g, i can put this:

ComboBox1.SelectedIndex = -1

I want to do this but in a listview control... can anyone help me?

Thanks

--
Tiago Salgado
http://www.foruns.org
Jul 10 '06 #3
In my last post, i indicate the solution that i've used...

Thanks

On Mon, 10 Jul 2006 14:22:53 +0100, <se*********@gmail.comwrote:
hi,

Try the following option

listview1.items.item(index).selected = false

where index is the item that you want to deselect.pls reply me whether
it works or not.

Thanks,
Ganesh

Tiago Salgado wrote:
>I've already made it... lol ... i use this code:

listview1.selectedindices.Clear()

On Sun, 09 Jul 2006 16:18:34 +0100, Tiago Salgado
<tiagosalgado.developer>
wrote:
I everyone... I've got a listview (details) ... and i'm trying to
unselect any item selected...

In a combobox, e.g, i can put this:

ComboBox1.SelectedIndex = -1

I want to do this but in a listview control... can anyone help me?

Thanks


--
Tiago Salgado
http://www.foruns.org


--
Tiago Salgado
http://www.foruns.org
Jul 10 '06 #4

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

Similar topics

13
by: Maheshkumar.R | last post by:
hi groups, I have placed an listview control, i want to iterate thru the control and find the clicked event items. listView2.Items.Add(fname.ToString(), i); how i can perform the iteration...
9
by: Devron Blatchford | last post by:
Hi there, Just wondering if I change the back and fore colour of a listview item when the mouse hovers over it? I want to overide the default windows colour. Can someone please tell me how to...
1
by: Shane | last post by:
I have a text box select items in a listview as text is being typed into the text box. I get the select bar to move correctly in the Listview control. If the user presses the down or up key in...
4
by: Shane | last post by:
I have a text box select items in a listview as text is being typed into the text box. I get the select bar to move correctly in the Listview control. If the user presses the down or up key in...
6
by: George | last post by:
Hi all, How can I get the value stored from the selected item and subitems of a listview? Thanks in advance, George
5
by: Phill W. | last post by:
(VB'2003) What's the correct way to remove multiple, selected items from a ListView control (say, from a ContextMenu)? I ask because I'm getting a very annoying ArgumentOutOfRangeException...
6
by: Brandon McCombs | last post by:
Hello, I have a form that contains a listview on the left side and a column of buttons on the right side. Only some of the buttons do I want enabled all the time. The other buttons should be...
4
by: spowel4 | last post by:
My form has a listview populated with the 50 states. When the user checks the checkbox within the listview for a particular state, I need to retrieve which state was checked (i.e. if AZ is checked...
5
by: Bart Steur | last post by:
Hi, What's the best way to programmaticly select (click) another listview Item after removing the selected/focused one. using VB2005 Express. Thanks Bart
12
by: Tom Bean | last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an item in a ListView and have encountered a something that seems strange to me. When the ListView is initially populated,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.