попробуйте с этим:
function element(value,options){
return $('<input type="hidden" value="'+value+'" />');
}
function elementval(elem){
return elem.val();
}
function fieldfunctions(id){
$( "#"+id+"_name").autocomplete({
source: "list.php",
minLength: 2,
select: function(event, ui) {
$("#"+id+"_id_name").val(ui.item.id);
}
});
}
$("#table").jqGrid({
url: 'data.php',
datatype: "json",
mtype: 'POST',
height: 400,
colNames: ['Name','Id name'],
colModel: [
{name: 'id_name',width: 30,hidden:true,editable:true,edittype:'custom',editoptions:{custom_element:element,custom_value:elementval}},
{name: 'name',index: 'name',editable:true,edittype:'text',width: 100}
],
onSelectRow: function(id){
$("#table").jqGrid('editRow',id, true,fieldfunctions);
}
});