Unable to get radiolist.SelecteValue when accessing the Radio button list from RadMultiPage

3 posts, 0 answers
  1. Dorababu
    Dorababu avatar
    95 posts
    Member since:
    May 2012

    Posted 28 May 2012 Link to this post

    This is my design

    <telerik:RadMultiPage ID="rdmpPersonal" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="rdpgSalary" runat="server">
                <telerik:RadAjaxPanel ID="rdpnlSalary" runat="server">
                    <telerik:RadPanelBar runat="server" ID="rdpbSalary" ExpandMode="FullExpandedItem"
                        Skin="Vista" EnableEmbeddedSkins="false" Width="550px">
                        <Items>
                            <telerik:RadPanelItem Expanded="true" Text="Employee Salary Information" runat="server"
                                Selected="true">
                                <Items>
                                    <telerik:RadPanelItem Value="SalaryInformation" runat="server">
                                        <ItemTemplate>
                                            <div class="text" style="background-color: #edf9fe">
                                                <ul class="formList" id="salaryinfo">
                                                    <li>
                                                        <asp:Label Width="150px" runat="server" ID="lblSalaryPayRate" AssociatedControlID="rdbtnlstPayRate">What is the Pay Rate?</asp:Label>
                                                        <asp:RadioButtonList ID="rdbtnlstPayRate" runat="server" AutoPostBack="true" RepeatDirection="Horizontal"
                                                            OnSelectedIndexChanged="rdbtnlstPayRate_SelectedIndexChanged" Style="width: 155px"
                                                            ValidationGroup="salaryValidation">
                                                            <asp:ListItem Value="S">Salary</asp:ListItem>
                                                            <asp:ListItem Value="H">Hourly</asp:ListItem>
                                                        </asp:RadioButtonList>
                                                        <asp:RequiredFieldValidator ID="rfvsalaryTypeID" runat="server" ControlToValidate="rdbtnlstPayRate"
                                                            ErrorMessage="Please Select One Pay Rate" ValidationGroup="salaryValidation"></asp:RequiredFieldValidator>
                                                    </li>
                                                     
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadAjaxPanel>
            </telerik:RadPageView>
        </telerik:RadMultiPage>

    This my code
    protected void rdbtnlstPayRate_SelectedIndexChanged(object sender, EventArgs e)
        {
    RadioButton rdbtnlstPayRate = (RadioButton)rdpbSalary.FindItemByValue("SalaryInformation").FindControl("rdbtnlstPayRate");
              
          Unable to access rdbtnlstPayRate .SelectedValue can some one tell where I went wrong
        }
  2. Dorababu
    Dorababu avatar
    95 posts
    Member since:
    May 2012

    Posted 28 May 2012 Link to this post

    Oops sorry I did a mistake rather than calling RadioButtonList I used RadioButton
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 28 May 2012 Link to this post

    Hi Dorababu,

    Were you able to resolve the problem?

    All the best,
    Peter
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top