473,387 Members | 1,834 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.

Initializing listView items

Hello,

I've created a 2-column listView control and have successfully labeled the
column headers using the ColumnHeader Collection editor. I would now like
to put some text items into the list using the ListViewItem Collection
Editor. I can successfully do this for the first column by simply entering
the Text field of the desired member but I haven't been able to figure out
how to put anything into the other columns. I figure there must simply be
some sort of delimiter to use between the desired text (but maybe I'm on the
wrong track).

Thanks,
Ray Mitchell
Nov 15 '05 #1
2 2713
Mornign Ray,
the other columns are represented as own objects. Every ListItem has a
collection of SubListItems where each SubListItem represents one column.

Greetings,
Matti

"Ray Mitchell" <Ra*********@MeanOldTeacher.com> schrieb im Newsbeitrag
news:iR*****************@newsread3.news.pas.earthl ink.net...
Hello,

I've created a 2-column listView control and have successfully labeled the
column headers using the ColumnHeader Collection editor. I would now like
to put some text items into the list using the ListViewItem Collection
Editor. I can successfully do this for the first column by simply entering the Text field of the desired member but I haven't been able to figure out
how to put anything into the other columns. I figure there must simply be
some sort of delimiter to use between the desired text (but maybe I'm on the wrong track).

Thanks,
Ray Mitchell

Nov 15 '05 #2
There is a property of a ListViewItem called SubItems

Hope this helps

Dan Cimpoiesu

"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:iR*****************@newsread3.news.pas.earthl ink.net...
Hello,

I've created a 2-column listView control and have successfully labeled the
column headers using the ColumnHeader Collection editor. I would now like
to put some text items into the list using the ListViewItem Collection
Editor. I can successfully do this for the first column by simply entering the Text field of the desired member but I haven't been able to figure out
how to put anything into the other columns. I figure there must simply be
some sort of delimiter to use between the desired text (but maybe I'm on the wrong track).

Thanks,
Ray Mitchell

Nov 15 '05 #3

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

Similar topics

6
by: VM | last post by:
How can I fill up a listview with text file contents? My listview has two columns and the first column fills up with a while loop: while (myString != null) { myString = sr.Readline();...
7
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override...
6
by: Nick | last post by:
Hi there, I'm trying to implement drag-drop for my listview control in large icon view mode. Unfortunately the order of the items gets completely messed up upon inserting the item back into the...
12
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on...
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...
1
by: samoore33 | last post by:
I found this code on MSDN, and it works great. It creates a ListView dynamically and add items to it and all. It is great. I have changed a few of the column names to suit me. Dim listView1 As...
0
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
2
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, In my application I need to periodically remove all current items from a ListView and add a new set into it. The following abbreviated code contains the basic idea: private void...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.