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 validation for dropdown in gridview

Thread ID:





120503 Sep 22,2015 05:03 AM UTC Sep 23,2015 11:27 AM UTC JavaScript 1
Tags: ejGrid
Bharat Buddhadev
Asked On September 22, 2015 05:03 AM UTC

var dropList = [
{ empid: "SelectedRowIndex", text: "SelectedRowIndex" }, { empid: "ViewRecord", text: "ViewRecord" }
var data = [
{ OrderID: 10248, EmployeeID: 1 },
{ OrderID: 10249, EmployeeID: 2 },
{ OrderID: 10250, EmployeeID: 3 },
{ OrderID: 10251, EmployeeID: 4 },
{ OrderID: 10252, EmployeeID: 5 }
$scope.setTargetList = function (targetList) {
$scope.data = data;
$scope.list = dropList
If we generate column in this way into grid than how to perform validation with column using jquery add method
for dropdown
2) if I will include extra textbox and in this way how to perform validation for that extra textbox.

Ragavee U S [Syncfusion]
Replied On September 23, 2015 11:27 AM UTC

Hi Bharat,

We are quite unclear on your query to perform validation with dropdown column.

As of now, we have created a sample with validation: {required: true} to the dropdown column, which can be downloaded from the following location.

Sample Link: http://jsplayground.syncfusion.com/lye0q1x3

In the above sample, we have bound dropDown dataSource with one blank value. On selecting the blank value on editing and saving, the validation message is popped.

Query: if I will include extra textbox and in this way how to perform validation for that extra textbox.

By above query, do you mean to set validation for other columns upon adding/editing. We can set the jquery validation for the columns using the validation property under the ejGrid columns api. If your query differs from our understanding,

Please share the below details
1.       jquery validation rule that you are expecting to apply to the dropdown column
2.       Are you expecting to set validation to the dropdown column based on another column value
3.       Explain what you actually meant by “if I will include extra textbox and in this way how to perform validation for that extra textbox.
4.       Share more and clear details on your requirement.

Ragavee U S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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