Is it possible to add client side validation to the fields of the Telerik MVC Grid at runtime. I am having validation JSON strings stored in the DB which I need to use when inserting or updating content
Thanks for the clarification in the comments.
By default validation rules are set using data annotation attributes. However I think you can implement custom metadata provider for ASP.NET MVC that applies validation rules at runtime. Perhaps this and this blog posts will be of help.
A more hacky solution would be to generate the JSON for the rules and override the ones output by ASP.NET MVC. Check the output of a page with client-side validation enabled and look for mvcClientValidationMetadata
.
I hope this helps
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.