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

Disable single CheckBox in CheckBoxList?

asp.net 1.1, vb.net

I have a CheckBoxList that I need to conditionally disable one or more
individual checkboxes from at runtime.

I was hoping I could so something like:
MyCheckBoxList.Items(1).Enabled = False

But it doesn't appear to work that way. Can I do this or would I have to
ditch the CheckBoxList and go with individual Checkboxes? I really hope
I do not have to do that!

Thanks!

Matt
Apr 27 '07 #1
1 4462
Matt,
You can do what you just described in ASP.NET 2.0, but it doesn't look like
you can do it quite that way in ASP.NET 1.x. However, you can try the
following workaround:
http://www.codeproject.com/aspnet/disableListItems.asp

--
Thanks,
Page Brooks
www.explosivedog.com
"MattB" <so********@yahoo.comwrote in message
news:59*************@mid.individual.net...
asp.net 1.1, vb.net

I have a CheckBoxList that I need to conditionally disable one or more
individual checkboxes from at runtime.

I was hoping I could so something like:
MyCheckBoxList.Items(1).Enabled = False

But it doesn't appear to work that way. Can I do this or would I have to
ditch the CheckBoxList and go with individual Checkboxes? I really hope I
do not have to do that!

Thanks!

Matt

Apr 27 '07 #2

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

Similar topics

2
by: sql | last post by:
Hi all, I am using a CheckBoxList control on my aspx page that I bind to an array at runtime. After I databind it, I check two of the items in the CheckBoxList controls. Now I also need to disable...
0
by: Francois Verbeeck | last post by:
Dear UseNet readers, Does anyone have any idea on how to colorize selected checkbox in checkboxlist control ? I've quite a huge checkboxlist (approximatively one full screen) and, to improve...
9
by: Harry | last post by:
Dear All, First of all, i have a database and i have to select the data in a table. In the web form, i have a checkbox in each rows. So that the use can select the row. initally, i am...
5
by: DotNetJunkies User | last post by:
1. i want to populate checkboxlist using javascript only at client side ....how can i do this..by populate word i mean that checkboxes should be checked or unchecked on some condition basis.......
1
by: segue | last post by:
I'm dynamically creating/populating a checkbox list and adding it to a web form. I want to when checking an item in the list have the autopostback retrieve the selected item. I'm dynamically...
7
by: ThunderMusic | last post by:
Hi, I have a CheckBoxList and I want to add some javascript code to each CheckBox created by this CheckBoxList. I tried iterating through all items of the list, all the controls, do a FindControl,...
1
by: Vikram | last post by:
How to disble a particular checkbox list item in a checkbox list
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...
3
by: | last post by:
Hi all, I have a CheckBoxList control which has about 10 items. I have set autopostback=true and also set an eventhandler for OnSelectedIndexChanged. The problem is I want to identify which...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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.