I am experiencing an issue when I converted a .NET radioButtonList to a Telerik.Web.UI.RadRadioButtonList.
We display Yes/No Radio Buttons, then depending on which was clicked we show a panel.
After the OnSelectedIndexChanged fires the RadRadioButtonList will disappear.
Additionally during the Event the SelectedValue is not set, and the SelectedIndex = -1. Niether of these issues happen with the ASP RadioButtonList object.
Any help would be greatly appreciated.
WG
Sample code to reproduce error:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TelerikRadioButtonListError.aspx.vb" Inherits="TelerikQuickQuote.TelerikRadioButtonListError" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<div>
<span>Are you Currently Insured:</span>
<telerik:RadRadioButtonList ID="RBL_CurrentlyInsured" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBL_CurrentlyInsured_SelectedIndexChanged">
<Items>
<telerik:ButtonListItem Text="Yes" Value="1" Selected="false"></telerik:ButtonListItem>
<telerik:ButtonListItem Text="No" Value="0" Selected="false"></telerik:ButtonListItem>
</Items>
</telerik:RadRadioButtonList>
<asp:Panel ID="PNL_PresentlyInsured" runat="server" Visible="false">
Presently Insured Controls
</asp:Panel>
<asp:Panel ID="PNL_NotPresentlyInsured" runat="server" Visible="false">
Not Presently Insured Controls
</asp:Panel>
</div>
</form>
</body>
</html>
Public Class TelerikRadioButtonListError
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub RBL_CurrentlyInsured_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim isPresentlyInsured As Boolean = (RBL_CurrentlyInsured.SelectedValue = "1")
If isPresentlyInsured Then
PNL_PresentlyInsured.Visible = True
PNL_NotPresentlyInsured.Visible = False
Else
PNL_PresentlyInsured.Visible = False
PNL_NotPresentlyInsured.Visible = True
End If
End Sub
End Class