SingleClick and validation

5 posts, 1 answers
  1. moegal
    moegal avatar
    278 posts
    Member since:
    Jul 2007

    Posted 04 Dec 2012 Link to this post

    I have a form with a RadButton set to use the new SingleClick and a RadDatePicker with a RequiredFieldValidator.

    The button stays depressed after clicking if the  RadDatePicker is empty.

    Any ideas?


  2. Answer
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2012 Link to this post

    Hey moegal,

    You can handle the OnClientClicking event of the RadButton and check if validation passed or not. If it doesn't you cancel the click, thus preventing the single click functionality from kicking in.

    function OnClientClicking(sender, args) {
                // make sure page is valid
                if (!Page_IsValid) {

    I hope that helps.
  3. moegal
    moegal avatar
    278 posts
    Member since:
    Jul 2007

    Posted 07 Dec 2012 Link to this post


    Thanks. That works!

    I had already tried it but I did so incorrectly (I was using the wrong event handler. "OnClientCheckedChanging" for the type of button)


  4. miksh
    miksh avatar
    285 posts
    Member since:
    Nov 2006

    Posted 24 Jun 2014 in reply to Kevin Link to this post

    A client-side validation is pretty common scenario, and telerik:Button should be smart enough not to disable itself if no postback/callback occurred. Would it be reasonable to add your workaround into Button logic?
  5. Dobromir
    Dobromir avatar
    1633 posts

    Posted 27 Jun 2014 Link to this post

    Hi Michael,

    This scenario is handled by RadButton, however there is a bug in the last version of Telerik UI for ASP.NET -

    The problem is already handled and the fix will be available in the upcoming service pack.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top