Ivan
Posted
on Feb 8, 2012
(permalink)
Is it possible to validate on client, input in form which is loaded via ajax call.
Reply
Alexander Valchev
Alexander Valchev
Posted
on Feb 8, 2012
(permalink)
Hello Ivan,
I suggest using jquery.validator.unobtrusive.parse method to achieve your goal. There is a sample project for common validation problems in our code library.
I hope this information helps. Please let me know if I can assist you any further.
Regards,
Alexander Valchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license!
Book your seat now >>
Reply
Ivan
Posted
on Feb 9, 2012
(permalink)
I tried with jquery.validator.unobtrusive.parse butt with no results.
Try to put <form> tag around tabstrip, and you will see, or just check attached solution.
Reply
Alexander Valchev
Alexander Valchev
Posted
on Feb 9, 2012
(permalink)
Hi Ivan,
<form> tag should not be wrapping the tabstrip, but the form's elements themselves.
I edited your project. Please check the attachment.
Greetings,
Alexander Valchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license!
Book your seat now >>
Reply
Ivan
Posted
on Feb 9, 2012
(permalink)
Butt I want exactly tabstrip to be placed inside of <form> tag .
Because I have several tabs and all of them should reside in one <form> tag for later submission to server.
Reply
Answer
Alexander Valchev
Alexander Valchev
Posted
on Feb 13, 2012
(permalink)
Hello Ivan,
It is not possible to validate the form items loaded via Ajax in your case, because:
- If there is no form in the partial view so validation attributes of input fields will not be rendered.
- If there is a form, it will be possible to validate and submit the data only within the current tab. However that will not work in Chrome, because the inner form will not be added to the DOM tree.
In addition when you use
LoadContentFrom method, input fields will not be added before their tab is selected. In other words, fields that are not loaded will not be validated or submitted.
I suggest you to load form fields on the server using the
Content method. For example:
This way all the problems above will be avoided.
Greetings,
Alexander Valchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license!
Book your seat now >>
Reply