You can extend a validate type and apply it to the combobox editor. Please refer to the code below.
$.extend($.fn.validatebox.defaults.rules, {
inList: {
validator: function(value, param){
const index = param[0].findIndex(row=>row[param[1]]==value);
return index>=0;
},
message: 'Not found'
}
})
$(function(){
$('#tt').edatagrid({
data: data,
columns: [[
{field:'itemid',title:'Item ID',width:100,editor:'textbox'},
{field:'productid',title:'Product',width:300,
formatter:function(value,row){
return row.productname;
},
editor:{
type:'combobox',
options:{
valueField:'productid',
textField:'productname',
data: products,
limitToList: true,
required:true,
validType:{
inList:[products, 'productname']
}
}
}
},
]]
});
});