$('#dg').edatagrid({ onBeforeEdit: function(index,row){ // return false on some conditions return false; }})