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

adding items to a Listview

Hi,

I wanted to add a few items to my listview control. The
values of these will be obtained from other controls on
my interface. When the user clicks the select button,
they will need to be added to my listview. This is what i
need help doing.
I have added the columns to the listview but i now want
to add the values that correspond to these columns so
that they all appear in a single row.

Here is my column heading and an example of how i want
the values to appear

Room Name Booking Date Meal Type Quantity
delux 1/1/2003 Chinese 3
Indian 2
Thai 4
the meal types can vary between each booking so i will
need a way of making sure they are all get inserted into
the 3 and 4th column.

Ca anyone give me some help on how to go about doing
this?? Is there a way to refernce a specific column in my
listview so i can add the values accordingly?

thxx in adavnce
Jul 21 '05 #1
1 1629
With a listview, you have in fact just one item, who is the first column.

If you choose detail view, you can see other columns, who are of type
ListViewSubItem

Note: if the change the text property of a listview subitem, the display
will not refresh automatically. You must assign the subitem to himself to
refresh the cell

"Angelina" <an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
Hi,

I wanted to add a few items to my listview control. The
values of these will be obtained from other controls on
my interface. When the user clicks the select button,
they will need to be added to my listview. This is what i
need help doing.
I have added the columns to the listview but i now want
to add the values that correspond to these columns so
that they all appear in a single row.

Here is my column heading and an example of how i want
the values to appear

Room Name Booking Date Meal Type Quantity
delux 1/1/2003 Chinese 3
Indian 2
Thai 4
the meal types can vary between each booking so i will
need a way of making sure they are all get inserted into
the 3 and 4th column.

Ca anyone give me some help on how to go about doing
this?? Is there a way to refernce a specific column in my
listview so i can add the values accordingly?

thxx in adavnce

Jul 21 '05 #2

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

Similar topics

9
by: Eva | last post by:
Hi, I wanted to know how i can enter values into a specific column of a listview. I have tried the following code but this seems to enter all my values into the first column!!! Can anyone...
2
by: cybertof | last post by:
Hello, Is there a solution to the following problem : When filling a listview (30 columns) with around 5000 items, it can take easily 10 sec for the listview to be filled. I have used...
0
by: Andrew | last post by:
If item is a ListViewItem and str is a string, why do the following two lines not have the same effect ? item.SubItems.Add(new ListViewItem.ListViewSubItem()).Text = str;...
3
by: Holmes | last post by:
Hello Ran into a bit of a problem here and have now exhausted my resources to getting this working What I am trying to do is load and show a simple vb form with a listbox in it Dim...
20
by: Ash Phillips | last post by:
Hi Everyone, I have this program I wrote in VB6 for family use. It's a DVD Database just for me to keep track of them cause I have so many lol. In VB6, I could add items to the ListView in...
2
by: dotnetnewbie | last post by:
Whilst looping through items in a listview I wish to have the option of inserting a new row (in the middle not necessarily at the end of the listview). thus if lvw is the listview name dim...
0
by: sonu | last post by:
Hi all, I have a listview control which has four columns like { Col1, Col2, Col3, Col4}. I add data in listview like this, dim lvitem as listviewItem
2
by: Joe | last post by:
Anyone can suggest the best method of reading XML and adding data to ListView? Here is the xml data structure:: <xml> <site> <url>http://www.yahoo.com</url> <lastupdate></lastupdate>...
9
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.