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

ListView and CheckBoxes

I've an app with a ListView. It shows my info and a user can move back and
forth to display different week days info.

I've introduced checkboxes when a certain condition is meet.

What I've not been able to figure out is how to trap when line items are
'checked' off by a User.

In other words, when a user clicks on 5 line checkboxes (5 checks), how can I
display that on my form (ie in a Label).

I know how to get the 'count' and all... but not how to have the label updated
as items are checked and unchecked.

Mucho appreciated.

John
Nov 20 '05 #1
2 1081
* JohnT <No***@notanaddress.xxx> scripsit:
I've an app with a ListView. It shows my info and a user can move back and
forth to display different week days info.

I've introduced checkboxes when a certain condition is meet.

What I've not been able to figure out is how to trap when line items are
'checked' off by a User.

In other words, when a user clicks on 5 line checkboxes (5 checks), how can I
display that on my form (ie in a Label).

I know how to get the 'count' and all... but not how to have the label updated
as items are checked and unchecked.


Have a look at the control's 'ItemCheck' event.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
With Deft Fingers, hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote:
In other words, when a user clicks on 5 line checkboxes (5 checks), how can I
display that on my form (ie in a Label).

I know how to get the 'count' and all... but not how to have the label updated
as items are checked and unchecked.


Have a look at the control's 'ItemCheck' event.


Right... I tried that once (something like:

Private Sub lvProjDisplay_ItemCheck(ByVal sender As System.Object, ByVal e
As System.EventHandler) Handles lvProjDisplay.ItemCheck
If lblCopyItems.Visible = True Then
lblCopyItems.Text = "Items Left: " & lvProjDisplay.CheckedItems.Count()
Else
lblCopyItems.Text = "Items Left: 0"
End If
End Sub
And this gives an error... but the above is something that I'm working on.
What I want to have happen is for my label (lblCopyItems) to update each time
a user clicks (or unclicks) a checkbox on the listview form.

Thx
Nov 20 '05 #3

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

Similar topics

0
by: Sandra | last post by:
I have a form with a list view control that has the checkboxes property set to true. This provides checkboxes as the first column in the listview. When a listviewitem is checked another form is...
2
by: Aaron Queenan | last post by:
Is there any way to know whether the OnItemCheck is being called in response to a user action (mouse or keyboard) as opposed to the form loading? I have a class which derives from...
0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
2
by: Alberto | last post by:
How can I insert checkboxs in some cells of a listView? Is it posible? Thank you.
3
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data,...
0
by: Yaron | last post by:
Hi, I have a ListView that is shown in Details mode, and the Checkboxes property is set to true. My problem is that I dont want the checkboxes being activated when items in the ListView are...
1
by: dvestal | last post by:
I have a ListView with checkboxes. I want to remove items when the checkboxes are unchecked, but to do so yields an ArgumentOutOfRangeException. Is there an easy way to get around this? A...
1
by: Carl Johansson | last post by:
I have a virtual ListView (VirtualMode set to true). To make it more convenient for the users of the ListView to select its items, I've set the ListView's CheckBoxes property to true. However, in...
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...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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:
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,...
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.