Please set the editor's 'url' property value before editing a row.
$('#dg').datagrid({
onBeforeEdit: function(index,row){
var row = $(this).datagrid('getRows')[index];
var col = $(this).datagrid('getColumnOption', 'idarticolo');
col.editor.options.url = 'ajax/wsgetofferta.php?firm='+row.idarticolo;
}
})