473,326 Members | 2,108 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,326 software developers and data experts.

ListViewItem checkbox disable

Is it possible to disable the checkbox of the particular ListViewItem?
I found code to check and uncheck the ListViewItem.
Expand|Select|Wrap|Line Numbers
  1. ListViewItem lvi = new ListViewItem("One");
  2. lvi.Checked = false;
but give me the solution for
Expand|Select|Wrap|Line Numbers
  1. lvi.Enable = false;
why does the Enable Property for ListViewItem does not exist?
Oct 21 '10 #1
1 7913
GaryTexmo
1,501 Expert 1GB
I did some googling around and it seems there are ways, but it depends on what you're looking for. I don't see a way to disable it in the "normal" sense of the word, in that it's still on the list but greyed out. However, you can remove (hide) it from the list and prevent clicking on it as well.

Anything more than that and you may need to override the paint event on the list view and draw it yourself, which could be tricky.

Another option might be to use a flowlayoutpanel and use individual checkboxes inside it instead of using a listview.

There might be a way, but I'm afraid I don't know it and those are the alternatives I can think of :) Perhaps someone else will have a better idea.
Oct 21 '10 #2

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

Similar topics

2
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...
5
by: Bob Bedford | last post by:
I create checkboxes using datas from a database (with PHP). I store all values in an array, as I must pass this value like a Form value. Now, in some cases, when a checkbox is selected, I must...
6
by: ML.Steve | last post by:
Hi, There are lots of posts on this subject but after a couple of hours of going though them I still can't get a number of fields to be disabled when a checkbox is ticked. Basically I have a...
2
by: Kufre | last post by:
I need anyone that have done this before to help me. I'm creating a form in Access, in the form has two two checkbox, checkbox A is paid, checkbox B is partial_paid. I want the set the checkbox so...
2
by: Marcelo | last post by:
Greetings! I develop a multiple forms application in Microsoft Visual Studio C++ .NET 2003. I am working with a listView with checkBoxes and an event relative to the clicking of a checkBox in this...
5
by: fred | last post by:
hiya, I have got a checkbox in one of my cells in the ediit item template. Now i need to enable/disable a textbox in another boundcolumn. the problem i am facing is the checkchanged event is...
4
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...
2
by: Kevin | last post by:
I've been looking all over and I can't seem to find what ought to be simple. I need to disable a drop down when a checkbox is checked, and enable it when same checkbox is unchecked. I've...
1
by: shobana | last post by:
Hi I have a bunch of checkboxes. While in fetch method iam checking it and disabling the checkbox which has data in backend. Rest are enabled. User can check the rest and update it. While in form...
5
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: ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.