Starting with DevExpress 14.1, the ASP.NET MVC GridView extension fully supports the unobtrusive client validation for built-in edit forms. Refer to the Support unobtrusive validation for the GridView's built-in edit form thread to learn more.
If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further clarification, create a new ticket in our Support Center.
This example illustrates how to implement Remote Validation in the context of the GridView's edit form. We use the approach illustrated in the E3744 - OBSOLETE - How to enable unobtrusive validation for GridView using the EditForm template code example as a starting point because it is necessary to process Update button click in a custom manner to handle remote validation correctly. Here is the major code part that accomplish this task:
If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further clarification, create a new ticket in our Support Center.
This example illustrates how to implement Remote Validation in the context of the GridView's edit form. We use the approach illustrated in the E3744 - OBSOLETE - How to enable unobtrusive validation for GridView using the EditForm template code example as a starting point because it is necessary to process Update button click in a custom manner to handle remote validation correctly. Here is the major code part that accomplish this task:
[JScript]function UpdateGridView(s, e){ PrepareValidationScripts(); var form = $('#frmProduct'); var validator = $.data(form[0], 'validator'); validator.form(); var timer = window.setInterval(function(){ if(form.data('validator').pendingRequest > 0) return; clearInterval(timer); if(validator.valid()) GridView.UpdateEdit(); }, 100); }