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

Another question about the listview control

Dom
how do I programmatically select an item in the listview item? In the
Listbox, I would just do "ListBox1.SelectedIndex = x". But the only
thing similar in the listview is the SelectedIndices Collection, and
that is "get" only.

Aug 30 '07 #1
5 1043
Hi Dom,

That's because you can select many of them.

e.g. listView.Items[1].Selected = true;

Regards, Alex
[TechBlog] http://devkids.blogspot.com
how do I programmatically select an item in the listview item? In the
Listbox, I would just do "ListBox1.SelectedIndex = x". But the only
thing similar in the listview is the SelectedIndices Collection, and
that is "get" only.

Aug 30 '07 #2
On Aug 31, 2:37 am, Dom <dolivas...@gmail.comwrote:
how do I programmatically select an item in the listview item? In the
Listbox, I would just do "ListBox1.SelectedIndex = x". But the only
thing similar in the listview is the SelectedIndices Collection, and
that is "get" only.
hi friend
here is the solution of which u can completly relly with, that is

http://www.startvbdotnet.com/controls/listbox.aspx
or
e.g. listView.Items[1].Selected = true;

Aug 31 '07 #3
On Aug 31, 2:37 am, Dom <dolivas...@gmail.comwrote:
how do I programmatically select an item in the listview item? In the
Listbox, I would just do "ListBox1.SelectedIndex = x". But the only
thing similar in the listview is the SelectedIndices Collection, and
that is "get" only.
The solution for your query is to refer Below Site that ensure that
actual solution to your specific query

http://www.startvbdotnet.com/controls/listbox.aspx
or
e.g. listView.Items[1].Selected = true;
Jitesh tolar
http://www.intelcs.com/IT-Companies

Aug 31 '07 #4
Dom
On Aug 30, 6:15 pm, Alex Meleta <amel...@gmail.comwrote:
Hi Dom,

That's because you can select many of them.

e.g. listView.Items[1].Selected = true;

Regards, Alex
[TechBlog]http://devkids.blogspot.com
how do I programmatically select an item in the listview item? In the
Listbox, I would just do "ListBox1.SelectedIndex = x". But the only
thing similar in the listview is the SelectedIndices Collection, and
that is "get" only.
Thanks, Alex. Don't know why I didn't guess that.

Aug 31 '07 #5
You need to select from the items collection something like

Listview.items[index].select = true;

It is possible to have more than one selected item.

Tom Groszko
Nov 22 '07 #6

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

Similar topics

0
by: Art Guerra | last post by:
Any tips or information would be most appreciated! Here is my scenario simplified: I have a main application form (Form1) and on that form is a listView control. On a separate form (Form2), the...
2
by: Ken | last post by:
Hi all, Please help! I'm attempting to apply tooltips to each individual item in VB.Net's Listview control. In VB6 it was easy - you just did the following (assumes "myListView" is the name of...
1
by: tmaster | last post by:
Within a class, can I create a property that is a listview? Here's what I tried, but it doesn't seem to work: '------------ create property to give the second form access to the first form's...
7
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The...
1
by: PiPOW | last post by:
Hi. I have a question. I am developing an application and I have to choose the most suitable control to show records from some database queries, with freedom in customizing control layout and...
1
by: StyrofoamSUV | last post by:
Hello all. I am interested in hiding a ListView Control underneath a TabControl. The ListView Control will contain say, 5 columns. When the user selects 1 of the tabs, I want to show the ListView...
10
by: Paul E Collins | last post by:
I want to fill an ImageList with bitmaps for a ListView from another thread, because it's a time-consuming process. I expect the ListViewItems' images to "load" one by one, as in a Web browser. ...
5
by: Mark Olbert | last post by:
How do I get the DataPager and ListView to play nice together when I use a custom datasource? In my webpage, I use linq to pull data from a SqlServer database and assign the resulting...
2
by: Tony | last post by:
Hello! I read about this ListView. Does is exist any component that is a ListView that is redy to be used in ..NET ? Is those CommonDialog(OpenFileDialog, saveFileDialog and so on) that is...
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.