This is a migrated thread and some comments may be shown as answers.

Validation summary client side

2 Answers 166 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Tiberiu
Top achievements
Rank 1
Tiberiu asked on 26 Jul 2011, 07:01 PM
Hi,
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.
Thanks,

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 Jul 2011, 01:57 PM
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

Regards,
Marin
Telerik
0
Tiberiu
Top achievements
Rank 1
answered on 27 Jul 2011, 04:51 PM
Yes, it works just fine.
Thanks.
Tags
Notification
Asked by
Tiberiu
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Tiberiu
Top achievements
Rank 1
Share this question
or