CheckBoxList strange behaviour on changing from enabled to disabled.

D

Dennis Johansson

I have a CheckBoxList like this one:

<asp:CheckBoxList id="chkReport" runat="server" DataValueField="rptID"
DataTextField="RptName" Enabled="False"
RepeatLayout="Flow"></asp:CheckBoxList>

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
 
D

Dennis Johansson

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top