473,503 Members | 3,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to disable the checkbox in the listview

Hi,

I use checkbox in the listview, sometime, I want to disable these
checkboxes, any body knows how to do so?

Thanks advance
Mar 7 '06 #1
1 6479
Handle the ItemChecked or ItemCheck event and set the NewValue back to the
CurrentValue in the supplied event args, i.e.:

Private Sub ListView1_ItemCheck(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemCheckEventArgs) Handles ListView1.ItemCheck
If e.Index = 0 Then
e.NewValue = e.CurrentValue
End If
End Sub

This will effectively prevent the user from changing the value
/claes
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
Hi,

I use checkbox in the listview, sometime, I want to disable these
checkboxes, any body knows how to do so?

Thanks advance

Mar 8 '06 #2

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

Similar topics

2
9723
by: HolaGoogle | last post by:
Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have to field.One is a "yes/no" field and another one is "number" field. To display the yes/no field...
2
7721
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...
0
1659
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...
4
10384
by: Matrixreloadedth | last post by:
How to change disable color of Checkbox??? I have a checkbox with forecolor in red but when i disable by set Enable properties to false forecolor is changed to gray color but i don't want it. how...
0
1517
by: Li Pang | last post by:
Hi, I want to know how to disable some of checkbox in a listview programatically. thanks
3
2515
by: =?Utf-8?B?QnJldA==?= | last post by:
I am a VB Developer w/ SQL Server experience breaking into web world via the Visual Web Developer Express. I've already set up my data sources to my SQL Server tables and have created a grid view...
5
11252
by: masterej | last post by:
Developers, Is there any way to disable all checkboxes on a form? I have a form with 160 checkboxes and I want to be able to disable all of them. Is there a way I can do something like this: ...
6
5506
by: Brandon McCombs | last post by:
Hello, I have a form that contains a listview on the left side and a column of buttons on the right side. Only some of the buttons do I want enabled all the time. The other buttons should be...
3
2123
by: ewankosayo | last post by:
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...
0
7192
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
7064
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
7445
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...
1
4991
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...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
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...

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.