Validation summary client side

3 posts, 0 answers
  1. Tiberiu
    Tiberiu avatar
    2 posts
    Member since:
    Jun 2011

    Posted 26 Jul 2011 Link to this post

    I have the following scenario:
    A RadTabStrip that has 4 tabPages.
    On first page i have some textboxes with validators on it.

    I want to do the following:
    when i try to change the page, the notification should show up if there are validation errors.
    I want this done on client side script.

    It looks that the validation fires before any onClient... event of the RadTabStrip.
    If i use a button inside the TabPage and i attach the script to the button, everything works fine.

    Please give me a solution.
  2. Marin Bratanov
    Marin Bratanov avatar
    4440 posts

    Posted 27 Jul 2011 Link to this post

    Hello Tiberiu,

    What I would suggest in your scenario is that you use the Client-side Page_ClientValidate() function to determine whether the validation has passed and raise a flag according to this value. Then according to the flag you can show a notification, cancel the user clicks on other tabs or on a submit button. For your convenience I created and attached a simple page that shows this behavior and does not allow the user to navigate to other tabs or submit the form unless the validators are satisfied. Please examine the approach I used and if you like you can extend it further to match your needs.

    I hope my example will help you advance in your project

  3. Tiberiu
    Tiberiu avatar
    2 posts
    Member since:
    Jun 2011

    Posted 27 Jul 2011 Link to this post

    Yes, it works just fine.
Back to Top