CheckBoxList strange behaviour on changing from enabled to disabled.

  • Thread starter Thread starter Dennis Johansson
  • Start date Start date
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
 
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?
 
Back
Top