Skip to content

DevExpress-Examples/asp-net-mvc-grid-client-side-unobtrusive-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid View for ASP.NET MVC - How to implement client-side unobtrusive validation using a custom attribute

Follow the steps below to implement unobtrusive client-side validation:

  1. Create a ValidationAttribute class descendant.
  2. Implement the IClientValidatable interface for this class to enable client validation.
  3. Write a custom adapter based on custom parameters that are passed from the server.
  4. Add a custom validation method.

Wrap the Grid View extension in a <form> element that can be rendered with Html.BeginForm(). Validation scripts will be automatically registered on a callback.

@using (Html.BeginForm("Index", "Home", FormMethod.Post, new { id = "frm" })) {
    @Html.Action("GridViewPartial")
}

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Implement unobtrusive client-side validation.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5