Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to enable unobtrusive validation for GridView using the EditForm template

$
0
0

The example illustrates how to implement unobtrusive validation for GridView editors. Create an Edit Form template that contains a form and all necessary editors. Corresponding validation attributes will be rendered for the template.
The main requirement is that the updating should be performed using a helper script. In the script block, we prepare validation conditions and check them for the form (that is located within the Edit Form template). If all editors are valid, the grid's UpdateEdit command is invoked.

[JScript]
function UpdateGridView(){ PrepareValidationScripts();var validator = $.data($('#frmProduct')[0], 'validator');if(validator.form()) grid.UpdateEdit();}function PrepareValidationScripts(){var form = $('#frmProduct');if(form.executed)return; form.removeData("validator"); $.validator.unobtrusive.parse(document); form.executed = true;}

GridView - EditForm template - How to enable Microsoft MVC validation
GridView - How to perform a custom client side unobtrusive validation for the EditForm template using a custom attribute

Question Comments

Added By: K R at: 6/14/2013 5:30:59 AM    

Unable to download this example, error below

ICAP Error (icap_error)

 
An error occurred while performing an ICAP operation: Maximum file size exceeded; File: GetExample; Sub File: Content\Site.css; Vendor: Kaspersky Labs; Engine error code: 0x00000000; Engine version: 8.1.8.79; Pattern version: 130614.102700.10398212; Pattern date: 2013.06.14 10:27:00
There could be a network problem, the ICAP service may be misconfigured, or the ICAP server may have reported an error.

For assistance, contact your network support team.

Added By: Vasily (DevExpress Support) at: 6/17/2013 8:00:14 AM    

Hi,

We detected that you have posted the same question to ticket Q502783 (ICAP Error occurs when downloading example:"An error occurred while performing an ICAP operation: Maximum file size exceeded"). We kindly ask you to avoid posting duplicated issues in the future. This will save time, and will allow us to provide better service.

We will post our answer in ticket Q502783 (ICAP Error occurs when downloading example:"An error occurred while performing an ICAP operation: Maximum file size exceeded").


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>