Hi there,
I'm running in a strange behaviour.
I have a RadioButtonList with on two options. When I change it fires a server side event the will hide one panel and show another panel.
The strange thing is that the event only fires once, ie, after the first SelectedIndexChanged event called the radio button doesn't fire anymore the event...
Here is an excerpt of the code:
On my code-behind I only have this:
I'm running in a strange behaviour.
I have a RadioButtonList with on two options. When I change it fires a server side event the will hide one panel and show another panel.
The strange thing is that the event only fires once, ie, after the first SelectedIndexChanged event called the radio button doesn't fire anymore the event...
Here is an excerpt of the code:
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"myRadioBList"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"panel1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"panel2"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:RadioButtonList
ID
=
"myRadioBList"
runat
=
"server"
RepeatDirection
=
"Horizontal"
AutoPostBack
=
"True"
OnSelectedIndexChanged
=
"myRadioBList_SelectedIndexChanged"
RepeatLayout
=
"Flow"
>
<
asp:ListItem
Value
=
"M"
>M</
asp:ListItem
>
<
asp:ListItem
Value
=
"C"
>C</
asp:ListItem
>
</
asp:RadioButtonList
>
<
asp:Panel
runat
=
"server"
ID
=
"panel1"
> .... </
asp:Panel
>
<
asp:Panel
runat
=
"server"
ID
=
"panel2"
> .... </
asp:Panel
>
On my code-behind I only have this:
protected
void
myRadioBList_SelectedIndexChanged(
object
sender, EventArgs e)
{
if
(myRadioBList.SelectedValue ==
"C"
)
{
panel1.Visible =
true
;
panel2.Visible =
false
;
}
else
{
panel1.Visible =
false
;
panel2.Visible =
true
;
}
}