473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listview Checkbox

26 New Member
Listview Checkbox
I populate here a listview and the checkbox property I set it to true so I can have a checkboxes on my listview.

My problem is if I checked two checkboxes on listview it falls to MyButton.Enable = False

Here’s what I wrote..

Expand|Select|Wrap|Line Numbers
  1. Private Sub MyListvView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyListView.Click
  2. If (Me.MyListView.CheckedItems.Count - 1) = 0 Then
  3. Me.MyButton.Enabled = False
  4. Else
  5. Me.MyButton.Enabled = True
  6. End If
  7. End Sub
Nov 13 '07 #1
3 2131
Frinavale
9,735 Recognized Expert Moderator Expert
You should check how many checkboxes are checked first, before re-enabling the button.
Nov 13 '07 #2
ewankosayo
26 New Member
nyek........... ...........
Nov 14 '07 #3
Frinavale
9,735 Recognized Expert Moderator Expert
nyek........... ...........
I don't understand you.
Nov 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
9292
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, checkbox's and icons are displayed as they are meant to be. My problem is this, I am trying to achieve the same results as I get with CheckListBox(s),...
2
2957
by: MikeY | last post by:
Hi all, I am coding window forms in C#. My problem is this: I have created a "Check ListView" or a 'ListView' with checkbox's. I have populated the it with my files from my folders, mps, txt, etc. The ListView is in Details, with headers and an Icon. What I am trying to accomplish is to rename/append check mark file massively (at...
1
2938
by: gabble | last post by:
I'm working with a subclassed listview control and I'd like to have the ability to set the checkbox on a certain item to indeterminate. I've tried adding three images to the stateimagelist (unchecked, checked, and indeterminate), but setting the checkstate in the ItemCheck event doesn't seem to do the trick. Actually, whenever I click on the...
2
7725
by: Terrance - all2know2001 | last post by:
How can I assign a checkbox to a listview ? I'm reading data from a foxpro table and one of the fields contains a 1 or 0. I would like for all 1's to show a checked checkbox in the listview. How do I get the checkbox in the listview? Thanks.
3
2144
by: Matt Michael | last post by:
I have a listview control and a collection object right now that I'm trying to pass information to and from. Whenever I click on the checkbox, I want it to remove certain listview items and add them to the collection. Whenever I uncheck the checkbox, I want to add the items back into the listview from the collection, and remove them from the...
0
1661
by: Nathan M | last post by:
Hi, In a listview with the View set to "Details" and CheckBox = True, is it possible to get the CheckBox to be centered vertically? The font size in my listview is 14, which increases the size of each row in the listview, but the checkbox remains in the upper-middle. Thanks, Nathan
2
1305
by: samoore33 | last post by:
I am working with a program that utilized the checkbox property of a listview. When a user clicked on the checkbox, it was suppose to calculate and total some prices. I did not make any changes to the listview, but now the method does not work when the checkbox is clicked. In trying to fix this problem, it would seem that when I click on...
0
2849
by: Marius Manolea | last post by:
Hi, I have a strange problem, I don't receive any modifications from listview in edit mode (OldValues & NewValues are empty) <asp:ListView ID="lvEditPersonRoles" runat="server" DataKeyNames="PersonId,RoleEntityGroup" DataSourceID="LDSPersonRoles"
0
5946
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a listview that when I select an item, it populates a details view. I want to show the item that was selected in the listview by changing it to yellow. Trouble is, the selected item does not show as yellow until I've clicked the same item two times. What am I doing wrong on the selected item that keeps it from changing to yellow until...
0
7502
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7434
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7692
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7946
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7791
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.