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

[Solved] Window refresh breaks client validation

2 Answers 95 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeroen Eikmans
Top achievements
Rank 1
Jeroen Eikmans asked on 16 Sep 2011, 01:06 PM
Hello,

i have a Window which uses LoadContentFrom.The ActionMethod it loads returns a view that has Ajax.BeginForm.

Initialy i opened the form using : $("#InsertUserWindow").data('tWindow').center().open();
But i wanted the form to be refreshed (so all textbox values get cleared) before opening so i changed the code in : $("#InsertUserWindow").data('tWindow').refresh().center().open();

The refresh() is the only difference.
Without the refresh call, the client-side validation works.
But when i use the refresh method the client-validation is not working anymore.

Do i have to call jQuery.validator.unobtrusive.parse('form'); after i refreshed the Window?
I tried this in the OnLoad and the OnOpen clientevents of the Window but in both cases the validation isn't working.

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 16 Sep 2011, 03:57 PM
Hi Roel Martens,

 In this case you should execute the jQuery.validator.unobtrusive.parse('form');  in onRefresh event of window component.

All the best,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jeroen Eikmans
Top achievements
Rank 1
answered on 16 Sep 2011, 04:08 PM
I totally overlooked that event :(
But thanks a lot! Works perfectly!!
Tags
Window
Asked by
Jeroen Eikmans
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jeroen Eikmans
Top achievements
Rank 1
Share this question
or