Hi Michael,
Thanks for contacting Syncfusion support.
We suspect that you are expecting validation for the particular column which supposed to be have integer values in the range -2 to 2. If you want validation before saving the record, define the validationRules property in the columns.
In this sample we used range as jQuery validation method to achieve the requirement.
Find the code example and sample:
$(function () {
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
-----------------------
allowPaging: true,
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },
------------------------
columns: [
---------------------
{ field: "Freight", headerText: 'Freight', textAlign: ej.TextAlign.Right, validationRules: { number: true, range: [-2, 2] }, width: 80 },
-----------------------
]
});
});
|
Refer to the Help document
Note: The below validation script files are needed when editing is enabled with validation.
1. jquery.validate.min.js
2. jquery.validate.unobtrusive.min.js
Regards,
Prasanna Kumar N.S.V