开发者

Client Side validation in Telerik's MVC Grid

Is it possible to add client side validation to the f开发者_StackOverflow社区ields 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜