469,927 Members | 1,752 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

CheckBoxList strange behaviour on changing from enabled to disabled.

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
Nov 17 '05 #1
1 1628
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*****@hotmail.com> wrote in message
news:3f********@news.wineasy.se...
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

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Richard Hollenbeck | last post: by
reply views Thread by Bryce Budd | last post: by
4 posts views Thread by dm_dal | last post: by
2 posts views Thread by Xarky | last post: by
reply views Thread by Tommy Martin | last post: by
2 posts views Thread by Ferret Face | last post: by
10 posts views Thread by Amit | last post: by
reply views Thread by Piotr Strycharz | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.