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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DialogTemplate Edit Mode: How to set validation for a column based on another column value?

Platform: ASP.NET MVC |
Control: Grid

You can set the validation rules to a column by using the Validation Rules property of the column in Grid. In certain cases, to set validation to a column based on another column value that is, to set conditional validation to a column, refer to the following solution.


Consider a Grid with a checkbox column and based on the value of the checkbox, another column is to be enabled or disabled and accordingly the validation is also to be set for that column.


To achieve the above requirement in Grid, refer to the following steps.

  1. Code for Template Edit form.


  1. Render the Grid control




  1. In the actionComplete events of the Grid, the textbox corresponding to the ShipCity label is disabled based on the value of the checkbox.


  1. In the change event of the checkbox, when the checkbox state is changed, the error messages are hidden.



2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
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.

Up arrow icon

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

Live Chat Icon For mobile