Check CausesValidation in Javascript

2 posts, 0 answers
  1. Paul Mc
    Paul Mc avatar
    32 posts
    Member since:
    Sep 2007

    Posted 13 Nov 2009 Link to this post

    Hi

    We have a javascipt function that is fired OnClientButtonClicked of a toolbar.  Some of the buttons on the toolbar have cause validation enabled while others don't.  Is there an easy way within the JS function to determine if the button clicked has CauseValidation set to false.

    Thanks in advance.

    Paul
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 18 Nov 2009 Link to this post

    Hi Paul,

    You should use get_causesValidation() method of the client-side RadToolBar button object like this:

    <script type="text/javascript">
        function buttonClicked(sender, args) {   
            var causesValidation = args.get_item().get_causesValidation();
        }
    </script>

    Kind regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top