function formatDGImage(val,row){ if (row){ ... return '<img src="..." onload="...">'; } else { return 'Missing logo'; }}