Use the remote validatebox to do server side validation, the code looks like this:
{field:'name',title:'Your Title',width:100,
editor:{
type:'validatebox',
options:{
required:true,
validType:'url["dovalidate.php","name"]'
}
}
}
The server side validate logic:
$name = $_REQUEST['name'];
//your validate code here
echo 'true'; // return true if validate successfully
Another way to do remote validation is to validate before end your editing.
var ed = $('#tt').datagrid('getEditor',{index:2,field:'name'}); // get the editor
var v = $(ed.target).val(); // get the field value
// do validate now
$.post('...',{name:v},function(result){
if (result.success){
$('#tt').datagrid('endEdit',2); // end editing
}
});