I have a RadButton with ButtonType=ToggleButton and ToggleType=CheckBox with an associated OnCheckedChanged callback. My problem is that the callback only fires on the 1st, 4th, 7th, etc. time I click the checkbox. I would like the callback to fire every time I toggle the check box. Does anyone know why the callback does not fire every time the checkbox is toggled?
Note: If I change focus after toggling the checkbox by clicking on another server control, the callback does fire the next time I toggle it even if it's just the 2nd time I toggle it.
Here's my aspx code:
Here's my callback function:
Note: If I change focus after toggling the checkbox by clicking on another server control, the callback does fire the next time I toggle it even if it's just the 2nd time I toggle it.
Here's my aspx code:
<
asp:UpdatePanel
ID
=
"UpdatePanel_System"
runat
=
"server"
UpdateMode
=
"Conditional"
ChildrenAsTriggers
=
"true"
EnableViewState
=
"True"
>
<
div
>
<
telerik:RadButton
ID
=
"displaySystemAnnouncementsCB"
runat
=
"server"
Text
=
"Display system announcements to all users at the top of the page"
ToggleType
=
"CheckBox"
OnCheckedChanged
=
"displaySystemAnnouncementsCBCB"
ButtonType
=
"ToggleButton"
>
</
telerik:RadButton
>
</
div
>
</
asp:UpdatePanel
>
Here's my callback function:
protected
void
displaySystemAnnouncementsCBCB(
object
sender, EventArgs e)
{
RadButton rb = (RadButton)sender;
if
(rb.Checked)
{
configuration.AppSettings.Settings[
"displaySystemAnnouncements"
].Value =
"1"
;
}
else
{
configuration.AppSettings.Settings[
"displaySystemAnnouncements"
].Value =
"0"
;
}
configuration.Save();
}