i want to validate an entry while editing jqxgrid column with list of values which are in a database table. user should only be allowed to save only those values. i can’t use a dropdownbox as the list is of large size. if user enters any value which is not in the list a validation error should be thrown.
my code looks like:
$(“#jqxgrid”).jqxGrid(
{ selectionmode: ‘multiplecellsadvanced’,
columns: [
{ text: ‘Delay Code’,datafield: ‘delay_det_code’, width: 110,editable:true,
validation: function (cell, value) {
var valid = isValidCode(value);
if(valid == -1){
return { result: false, message: “Enter valid delay code” };
}else { return true; }
}
}
in the above validation rule, there is a function isValidCode() which inturn makes an ajax call which returns a boolean.
this is not working as isValidCode() is making a server call.