473,326 Members | 2,124 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.

disabling individual items in a listbox

I want to disable individual items in a listbox or listview
Nov 15 '05 #1
2 9065
kranthi,

I don't know if it is possible. If anything, you can keep those items
from being selected by overriding the WndProc method and handling the
windows messages to those controls which control when selections are made.
Then, when an item that you want to "disable" is selected, you can prevent
it.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"kranthi" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
I want to disable individual items in a listbox or listview

Nov 15 '05 #2
Hi,

AFAIK this is not possible, I don't remember ever seen such a behavior on a
listbox, what you can do is make them unselectable, you can intercept the
SelectedIndexChange event and check if the new selected index is to be
disabled then just do something about it:
1- go back to the previous selected one, you will need to keep track of this
in a int variable
2- select next/prev
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"kranthi" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
I want to disable individual items in a listbox or listview

Nov 15 '05 #3

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

Similar topics

5
by: hiroshi ochi | last post by:
Hello, Using MSIE 6.0 and above, with javascript is it possible to display an individual tooltip for each item in a listbox? I need this functionality to show the listitems that are longer...
4
by: Colleyville Alan | last post by:
I am trying to use a list box to allow users to select items, the results are queried based on the selection and written to a spreadsheet. If the item already exists on their current spreadsheet,...
0
by: Priya | last post by:
I want to disable individual items in a listbox,listview in C#.NEt
6
by: Valerian John | last post by:
I have a ListBox webcontrol on an aspx page. Items are added to the ListBox using client-side code. However, when the page is posted back the items are missing/not available. (It is like the...
3
by: Joey | last post by:
Hi, I'm trying to add a default item to my listbox but when I do it tells me that it's not defined, could someone tell me the syntax I need to use to get the listbox control to display a default...
10
by: Jay | last post by:
Good afternoon, I have a radio list box called rblNavigateOptions and I need to be able to simply set one of those radio items to disabled before any item is selected by a user. ie. When the...
2
by: Brian Mitchell | last post by:
Is it possible to gray out individual items in the CheckedListBox? I have an option at the top of the list that simply says 'All', and when the user clicks that item I want the rest of the items in...
14
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe...
3
by: 124256 | last post by:
I set up a listbox connected to a database (Microsoft Visual C# generated the adapter, dataset, and binding source for me) and it's working just fine, except that the text that shows up in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.