Checked state text.

2 posts, 0 answers
  1. Katya
    Katya avatar
    21 posts
    Member since:
    May 2013

    Posted 27 Aug 2013 Link to this post

    I use a checkbox radbutton with two togglestates. From javascript how can I retrieve the checked state text? Please help.

  2. A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 28 Aug 2013 Link to this post

    Please use the below javascript function to get the text
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function GetToggleText() {
                    var button = $find('<%=btnToggle.ClientID %>');
                    if(button.get_selectedToggleState().get_index() == 0)
                        var text = button.get_selectedToggleState().get_text();

    HTML MarkUp
    <telerik:RadButton ID="btnToggle" runat="server" OnClientCheckedChanged="GetToggleText"
                ToggleType="CheckBox" ButtonType="LinkButton">
                    <telerik:RadButtonToggleState Text="Checked" PrimaryIconCssClass="rbToggleCheckboxChecked" />
                    <telerik:RadButtonToggleState Text="UnChecked" PrimaryIconCssClass="rbToggleCheckbox" />
  3. DevCraft R3 2016 release webinar banner
Back to Top