The 'loader' function must be moved to the 'options'. But it seams that you don't need this function. If you want to do the filter after selecting an item from the combobox, please try this code:
field:'comune_azienda',
type:'combobox',
options:{
editable:true,
url:'getComuni.php',
reversed:true,
onChange:function(value){
if (value == ''){
dg.datagrid('removeFilterRule', 'comune_azienda');
} else {
dg.datagrid('addFilterRule', {
field: 'comune_azienda',
op: 'equal',
value: value
});
}
dg.datagrid('doFilter');
}
}