We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to perform server side validation in Grid

Platform: ASP.NET MVC |
Control: Grid |
Published Date: May 12, 2016 |
Last Revised Date: May 12, 2016
Tags: ejgrid, grid, edit

You can perform the serverside validation using actionBegin event of ejGrid. The following code example shows how to perform server side validation in Grid.

  1. Render the Grid control.

JS

 

 MVC

 

ASP.NET

 

  1.  In actionBegin event, you have passed the edited records value to server side using AJAX post and perform the server side validation.

MVC

 

 

ASP.NET

  1. You can check duplicate values that are existing in the list and returned the Boolean values. And, in AJAX success if the return value is false (Doesn’t have duplicate), we have saved the records to Grid by calling the endEdit method. If the value has duplicate, we have shown the Error message to the dialog box.

MVC

 

 

ASP.NET

 

 

 

 The following output is displayed as a result of the above code example.

 

 

Figure: ServerSide Validation in Grid

 

2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon