473,573 Members | 2,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CheckBoxList strange behaviour on changing from enabled to disabled.

I have a CheckBoxList like this one:

<asp:CheckBoxLi st id="chkReport" runat="server" DataValueField= "rptID"
DataTextField=" RptName" Enabled="False"
RepeatLayout="F low"></asp:CheckBoxLis t>

I fill it with items from a database and check/select items corresponding to
another database query.
When first displayed, the user cannot select/deselect items since
Enabled=false. After pushing a button on the page the list gets
Enabled=true.
The problem is, when changing from disabled to enabled, all selections are
cleared and none of the checkboxes remain ticked. Btw viewstate is enabled.

Anyone heard of this problem and/or know a possible solution?
Thanks in advance...

Dennis
Nov 17 '05 #1
1 1709
Actually, the selections are cleared no matter what button i press, as long
as it generates a postback. If the CheckBoxList has Enabled=true, this does
not occur. Is there something wrong with CheckBoxList and the Enabled
property?

"Dennis Johansson" <ip*****@hotmai l.com> wrote in message
news:3f******** @news.wineasy.s e...
I have a CheckBoxList like this one:

<asp:CheckBoxLi st id="chkReport" runat="server" DataValueField= "rptID"
DataTextField=" RptName" Enabled="False"
RepeatLayout="F low"></asp:CheckBoxLis t>

I fill it with items from a database and check/select items corresponding to another database query.
When first displayed, the user cannot select/deselect items since
Enabled=false. After pushing a button on the page the list gets
Enabled=true.
The problem is, when changing from disabled to enabled, all selections are
cleared and none of the checkboxes remain ticked. Btw viewstate is enabled.
Anyone heard of this problem and/or know a possible solution?
Thanks in advance...

Dennis

Nov 17 '05 #2

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

Similar topics

0
1335
by: Richard Hollenbeck | last post by:
I've asked this question before but over a month later I still don't have an answer. A few people did try to help and I am thankful, but I really didn't get the problem solved. I'll try to ask the question another way. I have a main form for collecting grades for students' activities. Inside the form is a subform which displays four...
0
7939
by: Bryce Budd | last post by:
Hello All, I've been a taker of information from newsgroups for a long time and thought I'd finally make a contribution back to the community whose supported me when I've needed it. After all before commercialization took over that was the beauty of the Internet! I've create a checkboxlist validator control...something MS should have...
4
8063
by: dm_dal | last post by:
Is there a know issue surrounding the CheckBoxList control and it's viewstate? When my control is created, it's ListItems are checked as needed, but on a postback, they loose their Selected status. David
2
2192
by: Xarky | last post by:
Hi, I have a checkboxlist and would like to set it as readonly. The properties that I found for it is the Enabled(true, false). Now when I am setting it to false, it is becoming as readonly, but is changing its appearance and does not seems to be so presentable (color becoming greyish, text and check boxes are not clear). I tried to change...
0
992
by: Tommy Martin | last post by:
When the checkboxlist control is disabled the checks are not saved in the viewstate of the page so when another control has post back enabled i lose my checked items. Is there a way to force this to be saved?
2
1533
by: Ferret Face | last post by:
Is there a term for an individual who is half way between a Newby and a Novice? Anyway, getting down to business... I am trying to develop an on-line application form for my company's website. In it I have a number of 'Yes/No' or 'Select This Option' type questions where if an option is checked it will disable/enable another. I ended up...
10
1402
by: Amit | last post by:
Hi I have occured a very strange situation. The scenario is as follows. I have two buttons in the form. First button is Load button and the second one is Delete button. As the name suggests when 'Load' button is clicked, some data is loaded on the screen. When the Delete button is hit, this data is removed and the user does not have...
2
6243
by: Bart Van Hemelen | last post by:
The situation: I have a CheckBoxList cblTest, the items are disabled in cblTest_DataBound in a foreach (ListItem oItem in cblTest.Items) loop. I provide a link that calls a client-side JavaScript that enables the items -- this works perfectly. However, when I then click a LinkButton that does a postback and I loop through the items on...
0
1339
by: Piotr Strycharz | last post by:
Hi, Here is my situation: I have disabled CheckBoxList. This CheckBoxList (actually: all of the checkboxes) is being enabled by user using javascript code. Than - user can select some of the checkboxes and post the form. In .NET 1.1 it worked as expected: when control's state was set to enable - the selected checkboxes had their Selected...
0
7699
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
8027
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
8202
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...
1
7788
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6421
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
5594
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...
0
5292
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3733
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2216
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

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.