Un setting single click in JS

2 posts, 0 answers
  1. David Rhodes
    David Rhodes avatar
    60 posts
    Member since:
    May 2005

    Posted 10 May 2013 Link to this post

    I have a function to handle validation on my single click radbutton, how do I toggle the state of the single click in JS, currently the button remains with it's SingleClickText if the script below doesn't validate

    <script type="text/javascript">
                function DoSubscriptionValidation(button, args) {
                    var isValid = Page_ClientValidate('Subscription');
                    if (isValid) {
                        $find("<%= SubscriptionErrorNotification.ClientID %>").hide();
                    else {
                        $find("<%= SubscriptionErrorNotification.ClientID %>").show();
  2. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 15 May 2013 Link to this post


    This seems to be an issue with the RadButton when the following conditions are met:
    • SingleClick property of RadButton is enabled
    • AutoPostBack property of RadButtons is disabled either in the markup or on the client in the OnClientClicking event.

    I have logged the unexpected behavior as a feedback item here, so that you can monitor, comment or raise it priority by voting on it.

    For the time being, instead of performing a validation in the OnClientClicking event, you can simply put the RadButton, the validation controls and the controls which are to be validated in a common validation group. For example:

    <telerik:RadButton ID="RadButton1" runat="server" Text="Click" SingleClick="true"
        ValidationGroup="vg1" AutoPostBack="true" OnClick="OnClick1" OnClientClicking="DoSubscriptionValidation"
        SingleClickText="Please Wait" />
    <asp:TextBox ID="Textbox1" runat="server" ValidationGroup="vg1" />
    <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="Textbox1"

    As small token of gratitude for reporting this issue I have updated your Telerik points.
    Danail Vasilev
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top